Let m and j be the current ages of Matthew and Jenny, respectively.
Now, Matthew is 3 times as old as Jenny, so the variables are in the following relation:
[tex]m=3j[/tex]
In 7 years, both of them will be 7 years older, i.e. their ages will be m+7 and j+7, and Matthew will be twice as old:
[tex]m+7=2(j+7)[/tex]
Now, remembering that m=3j, we can rewrite the second equation as
[tex]3j+7=2j+14 \iff j = 7[/tex]
So, Jenny is 7 and Matthew is 21 (he's 3 times older).
In fact, in 7 years, they will be 14 and 28, and Matthew will be twice as old.