Your question is a bit thin on details (like what format are the inputs in, what it is exactly you want to calculate, etc.). The following should give you an idea of how to do whatever it is you want. Adapt as required:
%demo inputs:
incomes = table((1000:1010)', randi(10, 11, 1)*1e4, 'VariableNames', {'ssn', 'income'})
persons = table((1000:1010)', char(randi(double('az'), 11, 5)), categorical(randi([0 1], 11, 1), [0 1], {'Male', 'Female'}), randi(5, 11, 1), 'VariableNames', {'ssn', 'name', 'gender', 'region'})
taxes = table((1:5)', randi([10 20], 5, 1)/100, 'VariableNames', {'region', 'tax'})
%join tables:
alltaxes = join(join(incomes, persons), taxes)
%sum of income * tax, per region
taxperregion = rowfun(@(income, tax) sum(income .* tax), alltaxes, 'InputVariables', {'income', 'tax'}, 'GroupingVariables', 'region', 'OutputVariableNames', 'totaltax')