Answer:
4 hours
Step-by-step explanation:
We know the following:
Total amount Randy earned: $667
Pay for first 40 hours: $14.50 per hour
Pay after 40 hours: $21.75 per hour
We need to find the total extra hours: 
If the total number of hours worked are,
, then: 
Total pay received for the first 40 hours: 
If out of $667, Randy earns $580 from the first 40 hours, the left over are earned by extra hours.
$667 - $580 = $87 ------- (a)
Total pay received for working after 40 hours: 
We know from eq (a) that total pay is 87, hence we can find the number of hours using this.

Randy worked 4 extra hours.