Start by calling the number of home runs Peter hit 'P' and the number Alice hit "A'.
We know that "Altogether, they 18 home runs" so

.
We laso know that "Peter hit twice the difference of the the number of home runs Alice hit and 6. So:

Now we can substitute the second equation into the first:


And solve for A:



Alice hit 10 home runs.
Now we can plug this known value into the first equation and solve for P:



Peter hit 8 home runs.
To check, we can use the other equation that we didn't backsubstitute into:




CHECK