A quadratic equation [tex]ax^2+bx+c=0[/tex] has equal roots if and only if the determinant
[tex]\Delta = b^2-4ac[/tex]
equals zero.
In this case,
[tex]a=p-3,\quad b=4(p-3),\quad c=4[/tex]
So, the determinant is
[tex][4(p-3)]^2-4\cdot (p-3)\cdot 4[/tex]
Expand the square and multiply terms to get
[tex][4(p-3)]^2-4\cdot (p-3)\cdot 4=16(p-3)^2-16(p-3) = 16(p-3)[(p-3)-1)[/tex]
Which finally simplifies to
[tex]16(p-3)(p-4)[/tex]
This expression equals zero if one of the factors equals zero:
[tex]p-3=0 \iff p=3,\quad p-4=0 \iff p=4[/tex]