Question 1061350
Let x be amount of money Thomas started with.

First store: $ (x/2 +8)
Second store:$ {[x-(x/2 +8)]/2 +8}

If he had $7 left:
X- first store-second store= $7
X- (x/2+8)- [x-(x/2 +8)]/2 +8= 7
X-x/2-8-[(x-x/2-8)/2+8]=7
X-x/2-8-(x-x/2-8)/2-8=7
X/2-8-(x/2-8)/2-8=7
X/2-(x/2-8)/2-8-8=7
X/2-(x/2-8)/2-16=7
(X-x/2+8)/2=23
X-x/2+8=46
X-x/2=46-8
X-x/2=38
X/2=38
X=76
$76 is the amount of dollars he started with.

I hope my solution help you in Math.^^