We can solve for the number of slices eaten by each person by using variables.
Let's assign the variable 's' to the number of slices Sam ate and 'j' to the number of slices Jared ate.
Since Sam ate 4 more slices:
s = j + 4
Since together they ate 20 slices:
s + j = 20
We've already been given a value for 's' in the first equation. We can input this value into the second:
s + j = 20
(j + 4) + j = 20
2j = 16
j = 8
Now that we know how many slices Jared ate, we can input this value into the first equation to find how many slices Sam ate:
s = j + 4
s = 8 + 4
s = 12
j = 8, s = 12
Jared ate 8 slices of pizza and Sam ate 12 slices of pizza.