Answer:
The simplified ratio is Ilya:Dan:Total = 7:5:12
The non-simplified total is 360, so the ratio would be x:y:360
12•30=360, so you must multiply the other parts of the ratio by 30 in order to find out x and y
7•30=210
5•30=150
So, the ratio is 210:150:360
Ilya had 210 hats, Dan had 150, for a total of 360.
210-150=60
Ilya had 60 more hats than Dan