OK. I've changed the graph a little to make an easier example.

Let's say A is (2,3) and B is (12,8), and we want to divide the line into 5 equal parts.

(12-2)/5 = 2 and (8-3)/5 = 1 so we can step from point to point by going across 2 and up 1.

The points are (2,3) (4,4) (6,5) (8,6) (10,7) and (12,8)

So now to generalise that into a formula. For the x coordinates :

where i goes from 0 to n

and the y coordinate is similar.

Bob