A driver nearly caused a collision after she suddenly changed the direction where she was headed and cut past another motorist.