Từ \(x^2-2xy+2y^2-2x+6y+5=0\)
\(\Rightarrow\left(x^2-2xy-2x+y^2+2y+1\right)+\left(y^2+4y+4\right)=0\)
\(\Rightarrow\left(x-y-1\right)^2+\left(y+2\right)^2=0\)
\(\Rightarrow\left\{\begin{matrix}\left(x-y-1\right)^2=0\\\left(y+2\right)^2=0\end{matrix}\right.\)\(\Rightarrow\left\{\begin{matrix}x=-1\\y=-2\end{matrix}\right.\)
Thay vào P ta có: \(P=\frac{3x^2y-1}{4xy}=\frac{3\cdot\left(-1\right)^2\cdot\left(-2\right)-1}{4\cdot\left(-1\right)\cdot\left(-2\right)}=-\frac{7}{8}\)