Jill made some cookies. Jill gave 1/4 of her cookies to Bob. Then Jill gave 1/2 of the remaining cookies to Joe. At this point, Jill had 18 cookies left. How many cookies did Jill have at first?

T total cookies

T-(Tx1/4) - ((T-(Tx1/4))x1/2) =18
T-T/4 - 3T/4 x 1/2= 18
3T/4-3T/8=18
3T/8=18
3T=144
T=48

or,

after giving (1/4)T away, she has (3/4)T left
after giving 1/2 of those away, she has (1/2)(3/4)T or (3/8)T left

3T/8 = 18
3T = 144
T = 48

To find out how many cookies Jill had at first, we can work backward from the information given.

First, we know that Jill had 18 cookies left after giving some to Bob and Joe.

Let's start with the amount of cookies Jill had after giving some to Joe. We know that the amount Jill had at this point is half of what remained after giving some to Bob.

So, if Jill had 18 cookies left after giving some to Joe, the amount she gave to Joe must be the other half. This means that Jill originally had 18 * 2 = 36 cookies before giving some to Joe.

Now, let's find out how many cookies Jill had before giving some to Bob. We know Jill gave 1/4 of her cookies to Bob, so the remaining cookies must be 3/4 of the original amount.

If Jill originally had 36 cookies, the amount Jill gave to Bob must be 36 * 1/4 = 9 cookies.

Therefore, Jill had 36 + 9 = 45 cookies at first.