Five years ago:
Peter= P-5
Sam = S-5
Peter was 3 times older than Sam, which means that (P-5) = 3(S-5)
P-5 = 3S-15
So, the equation that would complete the system is C. P - 5 = 3S - 15
P-5 = 3S-15
P-3S = -15+5
P-3S = -10
So, now we use two equations: P-3S = -10 and the original one P+S=30
P-3S=-10
P+S=30 (to simplify the equation, multiply it by -1)
P-3S=-10
-P-S=-30
__________
0P-4S=-40
-4S=-40
4S=40
S=40/4
S=10
P+S=30
P+10=30
P=20
This means that Pete is 20, and Sam is 10. Hope this helps!