Subject Update summary in TableA based on records in TableB

Hi, the problem is that in TableB I have 'Tom Jones' who has 3 records. He has a field called WorkingHours. In the 1st record he works 3 hours, the second record 2 hours and the 3rd record 4 hours. So he works a total of 9 hours. I want to put this in a field in TableA called TotalHours.

My question is do I have to use a loop on TableB,sum the hours and put the total into TableA or is there a better way to do this?