3psqrt3-21psqrt2-p+7

Are you sure you did not mean to type

3psqrt3-21psqrt3-p+7 or

3psqrt2-21psqrt2-p+7 ?

You cannot factor it easily unless the first two terms have coefficients in a 1:7 ratio