Px^2-(2p+q)x+(p+q)=0

solve by completing of square method