Answer:
x = 48 and y = 104
Explanation:
Given equations are:

From equation 1:

Putting the value of y in equation 2

Now we have to put the value of y in one of the equation to find the value of x
Putting y = 104 in the first equation

Hence,
The solution of the system of equations is x = 48 and y = 104
The value of variable which was assumed for number of hats, is the total number of hats.