Here is a possible proof without induction. The idea is to consider $\det A$ as a function of $p_n$.

We define the function $F: \Bbb R \to \Bbb R$ as $$ F(p) = \begin{vmatrix} p_1 &a &\ldots &a &a \\ b &p_2 &\ldots &a &a \\ \vdots &\vdots &\ddots &\vdots &\vdots \\ b &b &\ldots &p_{n-1} &a\\ b &b &\ldots &b &p \end{vmatrix} $$

$F$ is a linear function of $p$ and therefore completely determined by its values at two different arguments.

$F(a)$ and $F(b)$ can be computed easily: By subtracting the last row from all previous rows we get $$ F(a) = \begin{vmatrix} p_1 &a &\ldots &a &a \\ b &p_2 &\ldots &a &a \\ \vdots &\vdots &\ddots &\vdots &\vdots \\ b &b &\ldots &p_{n-1} &a\\ b &b &\ldots &b &a \end{vmatrix} = \begin{vmatrix} p_1-b &a-b &\ldots &a-b &0\\ 0 &p_2-b &\ldots &a-b &0 \\ \vdots &\vdots &\ddots &\vdots &\vdots\\ 0 &0 &\ldots &p_{n-1}-b &0 \\ b &b &\ldots &b &a \end{vmatrix} \\ $$ i.e. $$ F(a) = a(p_1-b)\cdots (p_{n-1}-b) \, . $$ In the same way (or by using the symmetry in $a$ and $b$) we get $$ F(b) = b (p_1-a)\cdots (p_{n-1}-a) \, . $$

Now we can compute $\det A = F(p_n)$ with linear interpolation: $$ \det A = \frac{b-p_n}{b-a} F(a) + \frac{p_n-a}{b-a} F(b) \\ = \frac{- a(p_1-b)\cdots (p_{n-1}-b)(p_n-b) + b(p_1-a)\cdots (p_{n-1}-a)(p_n-a) }{b-a} \\ = \frac{-af(b) + bf(a)}{b-a} \, . $$


Hint. To emphasise the dependence of the $A$ and $f$ on $n$ as well as the $p_i$s, rewrite them as $A(p_1,\ldots,p_n)$ and $f(x; p_1,\ldots,p_n)$.

Now, in the induction step, subtract the last column by the last but one column. Then apply Laplace expansion. The $(n,n-1)$-th minor is $\det A(p_1,\ldots,p_{n-2},b)$, while the $(n,n)$-th minor is $\det A(p_1,\ldots,p_{n-1})$. Hence \begin{align} \det A &= (p_{n-1}-a)\det A(p_1,\ldots,p_{n-2},b)\\ &\phantom{=}+ (p_n-b)\det A(p_1,\ldots,p_{n-1})\\ &= (p_{n-1}-a)\frac{bf(a; p_1,\ldots,p_{n-2},b)-af(b; p_1,\ldots,p_{n-2},b)}{b-a}\\ &\phantom{=}+ (p_n-b)\frac{bf(a; p_1,\ldots,p_{n-1})-af(b; p_1,\ldots,p_{n-1})}{b-a}. \end{align} The rest is straightforward if you write each $f$ as a product of linear factors according to the definition.