The simplest way to do this would be to first subtract 5 from the total, because Matthew is going to be five years older than her.
19 - 5 = 14
14 will divide evenly by 2, making them each 7, but since Matthew is 5 years older, and 5 back to 7 to get his age.
7 + 5 = 12.
Matthew is 12 and Elizabeth is 7. Check your work.
12 + 7 = 19