can you solve this equation by using simultaneous equations and can you write the method please?

Sarah and Louise have a combined age of 24. Six years ago Sarah was triple Louise's age. What is Sarah and Louise's ages now. Let Sarah be x and Louise be y.

thankyou

Harry

S + L = 24

(S-6) = 3 (L-6)

solve first for L
L = (24 - S)

Multiply second out
S - 6 - 3 L - 18
S = 3 L -12

substitute our L from the first equation in the second equation
S = 3 (24 - S) - 12
S = 72 - 3 S -12
4 S = 60
S = 15
then use the first equation to find L
L = 24 - 15
L = 9

then check
Now
15 + 9 = 24 , yes they add to 24 check
Six years ago
15-6 = 9
9 - 6 = 3
sure enough, 9 is three times 3, check

S + L = 24

(S-6) = 3 (L-6)

solve first for L
L = (24 - S)

Multiply second out
S - 6 = 3 L - 18
S = 3 L -12

substitute our L from the first equation in the second equation
S = 3 (24 - S) - 12
S = 72 - 3 S -12
4 S = 60
S = 15
then use the first equation to find L
L = 24 - 15
L = 9

then check
Now
15 + 9 = 24 , yes they add to 24 check
Six years ago
15-6 = 9
9 - 6 = 3
sure enough, 9 is three times 3, check

Sure, Harry! I can help you solve this equation using simultaneous equations.

First, let's write down the information as equations. We'll use x for Sarah's age and y for Louise's age.

1. "Sarah and Louise have a combined age of 24":
This can be written as: x + y = 24

2. "Six years ago Sarah was triple Louise's age":
Six years ago, Sarah's age was x - 6, and Louise's age was y - 6.
According to the second part, we have the equation: x - 6 = 3(y - 6)

Now we have a system of two equations:
Equation 1: x + y = 24
Equation 2: x - 6 = 3(y - 6)

To solve this system, we can use either the substitution or elimination method. I'll show you the elimination method.

1. Multiply Equation 2 by 3 to eliminate the coefficient of x:
3(x - 6) = 3(3y - 18)
3x - 18 = 9y - 54

2. Simplify the equation:
3x - 9y = -54 + 18
3x - 9y = -36

3. Now we can eliminate the x term by subtracting Equation 1 from this new equation:
(3x - 9y) - (x + y) = -36 - 24
3x - 9y - x - y = -60
2x - 10y = -60

4. Simplify the equation:
2x - 10y = -60

5. Divide this equation by 2 to simplify it further:
(2x - 10y)/2 = -60/2
x - 5y = -30

Now we have the following system of equations:
Equation 1: x + y = 24
Equation 2: x - 5y = -30

We can now solve this system using any method we prefer.