You can put this solution on YOUR website! X times age of John is equal to Y times age of Alice.
Difference between their ages is M. John is older to Alice.
Find their ages.
j = John's age
a = Alice's age
:
"X times age of John is equal to Y times age of Alice."
jx = ay
:
"Difference between their ages is M. John is older to Alice.
j - a = m
j = a + m
a = j - m
Replace j in the 1st equation with (a+m)
x(a+m) = ay
ax + xm = ay
ax - ay = -xm
Factor out a
a(x-y) = -xm
a = is Alice's age
:
Find John's age
Replace a with (j-m) in the 1st equation
jx = y(j-m)
jx = jy - ym
jx - jy = -ym
Factor out j
j(x-y) = -ym
j = is John's age