If Julie bought 8 T-shirts, she would be short $28. If she bought 4 T-shirts and 3 baseball hats, she would have $17 left. If each hat cost $5, how much money did she have in the beginning

if she has x dollars,

8t = x+28
4t+3h = x-17
h=5

so,

4t+15 = x-17
x = 4t+32

8t = 4t+32+28
4t = 60
t = 15

x = 60+32 = 92

check:

8*15 = 120 = 92+28
4*15+3*5 = 75 = 92-17

To solve this problem, we can set up a system of equations.

Let's assume the cost of each T-shirt is "x" dollars and the initial amount of money Julie had is "y" dollars.

According to the first statement, if Julie bought 8 T-shirts, she would be short $28. This can be represented as:

8x = y - 28 (Equation 1)

According to the second statement, if Julie bought 4 T-shirts and 3 baseball hats, she would have $17 left. Each hat cost $5, so the total cost of the hats is 3 * 5 = $15. Therefore, we can write a second equation:

4x + 15 = y - 17 (Equation 2)

To find the initial amount of money Julie had (y), we need to solve this system of equations.

First, let's solve for x by subtracting Equation 2 from Equation 1:

8x - 4x = (y - 28) - (y - 17)
4x = -28 + 17
4x = -11

Divide both sides of the equation by 4 to solve for x:

x = -11/4

Now, substitute the value of x into either equation to solve for y. Let's use Equation 1:

8*(-11/4) = y - 28
-22 = y - 28
y = -22 + 28
y = 6

Therefore, Julie had $6 in the beginning.