You can put this solution on YOUR website! Pete is twice as old as Chris.
p = 2c
Seven years ago the sum of their ages were 31.
(p-7) + (c-7) = 31
p + c - 14 = 31
p + c = 31 + 14
p + c = 45
Find their ages now
replace p with 2c
2c + c = 45
3c = 45
c = 45/3
c = 15 is Chris's age
then
p = 2(15)
p = 30 is Pete's age
:
:
Check solutions in the statement
"Seven years ago the sum of their ages were 31"
30-7 + 15-7 = 31