Answer:
Tom kept 20 portugals for himself.
Explanation:
Let "n" be the number of portugals Tom kept for himself, then...
# of portugals which he gave to Ryan = n - 5
# of portugals which he gave to Neil = Ryan's portugals - 3 = (n - 5) - 3 = n - 8
Now, we know that...
Tom's portugals + Ryan's portugals + Neil's portugals = 47
Now substatute the values and get...
n + (n - 5) + (n - 8) = 47
n + n - 5 + n - 8 = 47
3n - 13 = 47
3n = 47 + 13
3n = 60
n = 20
Therefore Tom kept 20 portugals for himself.