How to make an object repel from another?

Hi im making a sort of tag game using hit testing, the controlling an object using keys and random motion but i have found that the random motion just takes my object into the one it is supposed to stay away from.
Any Help would be gratefully received:-/