Mary is 5 years older than Bob.
Mary is 22 and Bob is 17.
When you subtract 22 - 17, you will get 5. Mary and Bob are 5 years apart.
When you add 22 + 17, you'll get 39, which is the sum of their age.
The equation would be:
m + b = 39
M standing for Mary, B standing for Bob.
22+17= 39 would be the full equation.
M= 22
B= 17.
Sorry if this is confusing and doesn't help you that much, but I really hope it helped! :-)