x = # of days Maria worked
x + 5 = # of days Fred worded
$16(x + 5) + $18x = $1780
Let's distribute the $16
$16x + $80 + $18x = $1780
Combine like terms
$34x + $80 = $1780
Subtract $80 from both sides.
$34x = $1700
Divide both sides by $34
x = 50 days
Maria worked 50 days