I was just wondering what method / math you would have to use to push an player away from a object, depending on his position.

Diagram example: Image

I want to push players in the direction of the arrow. Any help is appreciated, thanks!