Q&A - Ticketed for Crossing Double Solid Line to Avoid a Collision
I have been ticketed for crossing a double yellow line just before the end of the right hand lane in a passing zone. The reason for this manoeuvre was I had been in the right lane and catching up to another vehicle, I switched to the left lane to overtake the slower moving vehicle, I estimate the speed variation to be around 30 KPH.

The video explains when not to pass, when it's okay to pass, and how to determine if you have time to pass safely. There is one fault with it as it shows passing on the right after crossing over a solid white line. This pass would be illegal in British Columbia. Otherwise, the advice is worthwhile.