What counts as an obstacle?A stationary object in a lane that makes it impossible to keep driving in that lane: a broken-down vehicle, an object lying on the road, damaged pavement. A fenced-off road work site counts too
When will the green car be able to pass the red one?When the red car has finished going around the obstacle, no other bans apply, and the next lane is clear for a distance long enough to pass
What if the vehicle ahead is itself passing someone?Then you may not pass it either: the same ban covers a vehicle that is itself passing