No, it would cost $210.
Each hour charges $40. 4 hours alone is $160.
On top of that, calling the electrician is a flat rate of $50. In total, it would cost $210.
More mathematically, you could set up an equation.
(Price) = $50 + $40 * (hours)
Then plug in 4 hours
price = 50 + 40*4
= 50+160
= 210