2-point question ( of )

Are you allowed in this situation to overtake the vehicle and then change lanes, if you want to leave the highway at the nearest exit?