After you have passed a vehicle moving in the same direction, it is safe to move back into the right lane:

When passing, you should not return to your original lane until you can see both headlights of the passed vehicle in your rearview mirror. Always check your blind spots before moving back into your original lane.
DMV Writen Test