The number of hats in Javier’s shop is six times the number of scarves. After selling 9 hats and buying 66 more scarves, the ratio of the number of hats to the number of scarves is now 3:5. How many hats and how many scarves were there at first?

number of scarves --- x

number of hats = 6x
(6x - 9) : (x + 66) = 3 : 5
(6x-9)/(x+66) = 3/5
30x - 45 = 3x + 198
27x = 243
x = ....

state you conclusion.