See attached files.
What you see is sort of a super-charged technique using a mapped content control titled "Total Hours," a CustomXMLPart event monitor, a target rich text CC and three building blocks stored in the template named "_1040, _780 and _520"
People do this sort of thing for a living