Answer:
4 hours
Step-by-step explanation:
For three visits, the electrician earned $40 × 3 = $120 in "per-visit" charges. For working x hours, he earned 20x in "per-hour" charges. The total of these came to 50x:
120 +20x = 50x
120 = 30x . . . . . . . . subtract 20x
4 = x . . . . . . . . . . . . . divide by 30
The electrician worked 4 hours that day.