Say Marilyn is now x years old

Then Rosie is now x + 3 years old

In seven years Marilyn will be x + 7 years old

Rosie will be x + 10 years old

Five years ago Marilyn was x - 5 years old

Rosie was x - 2 years old

So solve (x + 7)(x + 10) = 3(x - 5)(x - 2) + 5

Multiply it out first and simplify