As $(x-2)$ is a factor of $p(x)$
$\therefore p(2)=0$
$\Rightarrow p(2)^2+5(2)+r=0$
$\Rightarrow 4 p+10+r=0 \ldots(1)$
Again, $\left(x-\frac{1}{2}\right)$ is factor of $p(x)$.
$\therefore p\left(\frac{1}{2}\right)=0$
Now, $p\left(\frac{1}{2}\right)=p\left(\frac{1}{2}\right)^2+5\left(\frac{1}{2}\right)+r$
$=\frac{1}{4} p+\frac{5}{2}+r$
$\therefore p\left(\frac{1}{2}\right)=0$
$\Rightarrow \frac{1}{4} p+\frac{5}{2}+r=0 \ldots(2)$
From equation $(1),$ we have $4 p+r=-10$
From equation $(2),$ we have $p+10+4 r=0$
$\Rightarrow p+4 r=-10$
$\therefore 4 p+r=p+4 r[\because \text { Each }=-10]$
$\therefore 3 p=3 r$
$\Rightarrow p=r$
Hence, proved.




