p points from the -q to the +q: a distance of d.
r points from the centre of the dipole (midpoint of p, d/2) to the point A.
[t] is the angle between them
V = q / (4pi{e0}r)
So the potential at A is the sum of the potential from both the charges, using the cosine rule to find the distance, r, to each charge. Notice the (-d/2) in the positve charge's term because it's cos(pi - t) = -cos(t).
V = (q / (4pi{e0})) * ({(r^2+(d/2)^2-d*r*cos[t]}^(-1/2) - {(r^2+(d/2)^2+d*r*cos[t]}^(-1/2))
Take out r^2 from each of the terms....
V = (q / (4pi{e0}*r)) * ({(1+(d/2r)^2-(d/r)*cos[t]}^(-1/2) - {(1+(d/2r)^2+(d/r)*cos[t]}^(-1/2))
You've got (1 + x)^(-1/2) in the terms, so use binomial theorem and it drops out.