2g + 4h = 43
2g + 2h = 30
Well, there are numerous ways to solve this, but hopefully you can see that Cody simply bought 2 more hats than Tori and paid $13 more, meaning 2 hats cost $13.
2h = 13
2h/2 = 13/2
h = $6.50
Then, since we know 2 hats cost $13, two pairs of gloves make up the rest of Tori's $30 purchase, or $17.
2g = 17
2g/2 = 17/2
g = $8.50
If neither of those jumped out at you, perhaps you see that both bought 2 pairs of gloves.
2g = 43 - 4h
2g = 30 - 2h
Hey, 2g equals two different things, so they must equal each other!
43 - 4h = 30 - 2h
13 = 2h
h = $6.50
Then, substitute into either equation.
2g + 2(6.5) = 30
2g + 13 = 30
2g = 17
g = $8.50
Don't see that, either? How about elimination?
2g + 4h = 43
-2g - 2h = -30
2h = 13
h = $6.50
etc...
Hope this helps!