Each boy appears in exactly two of the three pairs. So adding all three pair-totals counts every boy twice.
Plain numbers are given; italic underlined numbers are worked out.
The three boys have 30 cards in total.
Check: Paul 12, Simon 13, Gray 5 → 12+13=25, 13+5=18, 12+5=17; total 30. ✓