The potential energy is inversely proportional to square of distance between the charges.It also depends whether both charges are of same or opposite sign, if both are of same sign then potential energy will decrease and if opposite charges then it will increase