.
If she started with x hats, then
x + = 17
x + 4 = 17
x = 17 - 4 = 13. ANSWER
She started from (or with) 13 hats.
Solved.
-------------
Even if you are 2-nd or 3-rd grade student, you still can solve it MENTALLY, without using equations.
It is totally obvious how to do it . . .