Question 344035
You have the right idea!..Just using more info than you need to solve at first.
The way to look at it is that Joyce will "always" be 24 yrs older than Melissa!
so..the 2 years is not important information to set up the equation you need AT FIRST if you just let J be Joyces age in two years time.

THE QUESTION STATES THEN THE FOLLOWING TO BE TRUE(in two years)
Joyce will be 3 times as old as Melissa and, as always, 24 years older.
J =3(J-24) 

Simplify:
J = 3*J -72
0=2*J -72
72=2*J
J=36 (THAT'S THE AGE JOYCE WILL BE IN 2 YEARS) Melissa(36/3)or 12 in two years
How old are they now?" Joyce is 34 and Melissa is 10

Check your answer: Joyce is always 24 years older than Melissa.

In this case it was the easiest to just set up what the problem said would be true in two years and work backwards from there!