When passing another vehicle on a two lane roadway
Passing another vehicle on a two lane roadway is one of the most demanding ordinary maneuvers because it requires sharing the oncoming lane, judging closing speed, and committing fully once the move begins. The legal and safe answer is to pass only where permitted, when the passing zone is clear far enough ahead, and when your vehicle can complete the maneuver before encountering oncoming traffic. Visibility, road markings, following distance, and driver attention all change the decision. A broken centerline is not permission by itself; you must still confirm that the gap ahead is long enough for your speed and acceleration.
Direct answer
You should pass another vehicle on a two lane roadway only when the centerline on your side is broken, the oncoming lane is clear well beyond the vehicle you are overtaking, and you have enough clear distance to return to your lane without forcing anyone to brake or steer. Begin from a normal following distance so you can see ahead and use the space as a brief acceleration zone. Signal, move left, pass promptly, and signal again before returning only after the passed vehicle is fully visible in the rearview mirror.
Passing is prohibited where signs, solid lines, hills, curves, intersections, railroad crossings, bridges, tunnels, or poor road conditions hide oncoming traffic. Even on a straight road, do not pass if an approaching vehicle is closing quickly or if the vehicle ahead is already near the speed limit. The safe decision depends on visibility and the time needed to accelerate past, not simply on whether the lane marking allows it. When any part of the gap is uncertain, the correct move is to hold position and wait for a genuinely open passing zone.