Ray saved $240 more money than John. After Ray gave 5/12 of his savings to John, Ray still had $20 more money than John.

a) How much money did Ray have in the end?
b) How much money did John have at first?

Let's start by using algebra to solve the problem.

Let's assume that John had x dollars saved at first. Then, we know from the problem that Ray had $240 more saved than John, so Ray had (x + $240) saved at first.

After Ray gave 5/12 of his savings to John, Ray had 7/12 of his original savings left. We know that this was $20 more than what John had, so we can set up an equation:

7/12(x + $240) = $20 + 5/12x

Now we can solve for x:

7/12x + $140 = $20 + 5/12x

2/12x = $-120

x = $-720

This doesn't make sense as a solution, because it means that John had negative money saved at first. So we made an error somewhere.

Let's try another approach. We know that Ray had $240 more saved than John at first, so we can write:

Ray's savings = John's savings + $240

After Ray gave 5/12 of his savings to John, Ray had 7/12 of his original savings left, so we can write:

7/12(Ray's savings) = John's savings + $20

Now we can substitute the first equation into the second equation:

7/12(John's savings + $240) = John's savings + $20

Simplifying:

7/12 John's savings + $140 = John's savings + $20

6/12 John's savings = $-120

John's savings = $-240

This still doesn't make sense as a solution. We made another mistake.

Let's try one more time. This time, let's start with the second equation and solve for Ray's savings, then use the first equation to solve for John's savings.

7/12(Ray's savings) = John's savings + $20

Ray's savings = 12/7(John's savings + $20)

Ray's savings = 12/7 John's savings + $240/7

Now we can substitute this into the first equation:

12/7 John's savings + $240/7 = John's savings + $240

5/7 John's savings = $240

John's savings = $168

Now we can use the first equation to find Ray's savings:

Ray's savings = $168 + $240

Ray's savings = $408

So the answers are:

a) Ray had $408 in the end.

b) John had $168 at first.

To solve this problem, we can set up a system of equations based on the given information.

Let's assume that John initially had $x in savings.

According to the problem, Ray saved $240 more money than John. Therefore, Ray had $(x + $240) in savings.

After Ray gave 5/12 of his savings to John, Ray still had $20 more money than John. So, we can set up the equation:

(x + $240) - (5/12) * (x + $240) = x + $20

Now, let's solve the equation step by step.

Step 1: Distribute the (5/12) to the terms inside the parentheses.
(x + $240) - (5/12) * x - (5/12) * $240 = x + $20

Step 2: Combine like terms on the left side of the equation.
x + $240 - (5/12) * x - $100 = x + $20

Step 3: Combine the constants on the left side of the equation.
(x - (5/12) * x) + ($240 - $100) = x + $20

Step 4: Simplify the equation by multiplying.
(7/12) * x + $140 = x + $20

Step 5: Move all the terms with "x" to one side and the constant terms to the other side.
(7/12) * x - x = -$20 + $140

Step 6: Simplify the equation by combining like terms on the left side and the right side.
(7/12 - 1) * x = $120

Step 7: Simplify the equation on the left side.
(-5/12) * x = $120

Step 8: Multiply both sides by -12/5 to isolate x.
x = ($120 * -12/5)

Step 9: Calculate the value of x.
x = -$288

Now that we have found the value of x, we can answer the questions:
a) How much money did Ray have in the end?
Ray initially had $(x + $240) = (-$288 + $240) = -$48.

b) How much money did John have at first?
John initially had $x = -$288.

Let's assume that John had x amount of money.

a) After Ray saved $240 more than John, Ray's savings can be represented as (x + $240) because Ray saved $240 more.

b) Ray gave 5/12 of his savings to John, so the remaining amount of money Ray had is (1 - 5/12) = 7/12 of (x + $240).

c) According to the given information, Ray still had $20 more money than John, so the equation can be set up as follows: (7/12) * (x + $240) = x + $20.

To solve this equation, we can start by multiplying both sides of the equation by 12 to get rid of the denominator:

7(x + $240) = 12(x + $20)

After expanding, we have:

7x + $1680 = 12x + $240

Next, we can move all the terms with x to one side of the equation and the constant terms to the other side:

7x - 12x = $240 - $1680
-5x = -$1440

Dividing both sides of the equation by -5 gives:

x = $1440 / 5
x = $288

Therefore, John had $288 at first.

To find out how much money Ray had in the end, we can substitute this value back into the equation for Ray's savings:

Ray's savings = x + $240 = $288 + $240 = $528.

So, Ray had $528 in the end.