Answer
$det(A)=4x-2y-2$
Work Step by Step
$ \begin{bmatrix}
x & y & 1 \\
2& 3 & 1 \\
0 & -1 & 1
\end{bmatrix} $
$M_{11}= \begin{bmatrix}
3 &1 \\
-1& 1\\
\end{bmatrix} = 3\times1-(-1)\times1=4$
$M_{12}= \begin{bmatrix}
2 &1\\
0& 1\\
\end{bmatrix}=2\times1-0\times1=2$
$M_{13}= \begin{bmatrix}
2 &3 \\
0& -1\\
\end{bmatrix}= 2(-1)-0\times3=-2$
To calculate the cofactors, use the cofactor definition: $C_{ij}=(-1)^{ij}\times M_{ij}$
$C_{11}=4$
$C_{12}=-2$
$C_{13}=-2$
$det(A)=a_{11}C_{11}+a_{12}C_{12}+a_{13}C_{13}$
$det(A)=x\times4+y\times(-2)+1\times(-2)$
$det(A)=4x-2y-2$