$$x^{2}-\frac{2}{p}(p^{\gamma}+1)x+4$$
$-2xp^{\gamma -1}+x^{2}-\frac{2x}{p}+4$
$\frac{2\left(px-p^{\gamma }-1\right)}{p}$