Joe = x
Dennis = 3x
Joe + Dennis = 84
or in other words
x + 3x = 84
4x = 84
x = 84 / 4
x = 21
And if we remember that Joe was x and Dennis was 3x, you can just substitute x to find out how much they paid.
1(21) = 21 = Joe paid $21
3(21) = 63 = Dennis paid $63.