We know that $(1+x)^n =\sum_{k\geq 0}^{n} \begin{pmatrix} n \\ k \end{pmatrix}x^n$ .
The expansion consists of $(n+1)$ terms, the coefficient of the $m^{th}$ term being $\begin{pmatrix} n \\ m-1 \end{pmatrix}$.
Since the coefficients of $p^{th}, (p+1)^{th}$ and $(p+2)^{th}$ terms are in A.P,
$\therefore$ $\begin{pmatrix} n\\ p-1 \end{pmatrix} + \begin{pmatrix} n \\ p+1 \end{pmatrix} = 2\begin{pmatrix} n \\ p \end{pmatrix}$
$\Rightarrow \frac{\not{n!}}{(n-p+1)! (p+1)!} + \frac{\not{n!}}{(n-p-1)!(p+1)!} = \frac{2\not{n!}}{(n-p)!p!}$
$\Rightarrow \frac{(p+1)p + (n-p+1)(n-p)}{(n-p+1)!(p+1)!} =\frac{2}{(n-p)!p!}$
$\Rightarrow \frac{(p+1)p + (n-p+1)(n-p)}{(n-p+1)(p+1)} = 2$
$\Rightarrow (p+1)p + (n-p+1)(n-p) = 2(n-p+1)(p+1)$
Solving this equation we get
$(n-2p)^2 =n+2$
Hence, the correct option is (C).