There were 30 sheep involved in the original transaction.
The troll has 25.
His sons have 2.
The shepherds have the 3 that were returned.
To look at it the other way, the shepherd paid a net amount of 27 sheep. The troll has 25, his sons have the other 2.
You don't add the 27 and the 2 - the 27 is the total of the 25 and the 2.
Biggest one for me was swapping from setting the alarm as late as possible and then rushing to get out of the house, to setting it an hour earlier and using that to read, do a little qi gong and have a leisurely breakfast.