Hey Saifa.

This sounds like a standard optimization problem where you are maximizing distance. The first thing you should do is convert the problem to a set of equations and inequalities.

Do you have a definition for lines A and B in terms of all the points?