Answer
See the detailed answer below.
Work Step by Step
First, we need to sketch this dipole and the point at which we need to measure the electric potential, as shown below.
We know that the potential at any point is the superposition of the potentials due to all charges.
So the potential at point $\rm p$ due to the two-point charges of the dipole is given by
$$V_{\rm p}=\dfrac{1}{(4\pi \epsilon_0)}\dfrac{ q}{r_1}+\dfrac{1}{(4\pi \epsilon_0)}\dfrac{ -q}{r_2} $$
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0)}\left[\dfrac{ 1}{r_1}- \dfrac{ 1}{r_2} \right]\tag 1$$
From the geometry of the figure below, we can see that
$$r_1=\sqrt{x^2+(y-s/2)^2}$$
and that
$$r_2=\sqrt{x^2+(y+s/2)^2}$$
Plug these into (1);
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0)}\left[\dfrac{ 1}{\sqrt{x^2+(y-s/2)^2}}- \dfrac{ 1}{\sqrt{x^2+(y+s/2)^2}} \right]$$
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0)}\left[\dfrac{ 1}{\sqrt{x^2+y^2-ys+(s/2)^2}}- \dfrac{ 1}{\sqrt{x^2+y^2+ys+(s/2)^2}} \right]$$
From the geometry of the figure below, $r^2=x^2+y^2$
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0)}\left[\dfrac{ 1}{\sqrt{r^2-ys+(s/2)^2}}- \dfrac{ 1}{\sqrt{r^2+ys+(s/2)^2}} \right]$$
We are given that $r\gt\gt s$, so $(s/2)^2$ is negligible compared to $r^2$ or $ys$
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0)}\left[\dfrac{ 1}{\sqrt{r^2-ys }}- \dfrac{ 1}{\sqrt{r^2+ys }} \right]$$
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0)}\left[ \left(r^2-ys\right)^{-\frac{1}{2}} - \left(r^2+ys\right)^{-\frac{1}{2}}\right]$$
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0) r}\left[ \left(1-\dfrac{ys}{r^2}\right)^{-\frac{1}{2}} - \left(1+\dfrac{ys}{r^2}\right)^{-\frac{1}{2}}\right]\tag 2$$
We can use the binomial expansion $(1+x)^n$ to approximate this, where $x=\dfrac{-ys}{r^2}$ and for the second term $x=\dfrac{ys}{r^2}$.
$$ \left(1+\dfrac{-ys}{r^2}\right)^{-\frac{1}{2}}\approx 1+\left[-\frac{1}{2}\dfrac{-ys}{r^2}\right]+\dfrac{\frac{-1}{2}(\frac{-3}{2})}{2!}\left(\dfrac{-ys}{r^2}\right)^2+\cdot\cdot\cdot$$
$$ \left(1+\dfrac{ys}{r^2}\right)^{-\frac{1}{2}}\approx 1+\left[-\frac{1}{2}\dfrac{ ys}{r^2}\right]+\dfrac{\frac{-1}{2}(\frac{-3}{2})}{2!}\left(\dfrac{ ys}{r^2}\right)^2+\cdot\cdot\cdot$$
So when we subtract the last formula from the first one, we got
$$ \left(1-\dfrac{ys}{r^2}\right)^{-\frac{1}{2}}- \left(1+\dfrac{ys}{r^2}\right)^{-\frac{1}{2}}=\dfrac{ys}{r^2}+\dfrac{-2(\frac{-1}{2})(\frac{-3}{2})(\frac{-5}{2})}{3!}\left(\dfrac{ ys}{r^2}\right)^3+\cdot\cdot\cdot$$
where the second term is also negligible.
Therefore,
$$ \left(1-\dfrac{ys}{r^2}\right)^{-\frac{1}{2}}- \left(1+\dfrac{ys}{r^2}\right)^{-\frac{1}{2}}=\dfrac{ys}{r^2}$$
Plug into (2),
$$V_{\rm p}=\dfrac{q}{(4\pi \epsilon_0) r}\left[\dfrac{ys}{r^2}\right] $$
$$V_{\rm p}=\dfrac{qs}{(4\pi \epsilon_0) r^3} y$$
We can see that $\cos\theta=\dfrac{y}{r}$, so $y=r\cos\theta$
$$V_{\rm p}=\dfrac{p}{(4\pi \epsilon_0) r^3}r\cos\theta$$
$$\boxed{V_{\rm p}=\dfrac{1}{(4\pi \epsilon_0)}\dfrac{p\cos\theta}{ r^2} }$$