Nothing went wrong, just use elementary row operations ! Subtract the first row from the second and third, to recover the form stated in the book
\begin{eqnarray*}
\begin{vmatrix}
x-x_1 & y-y_1 & z-z_1 \\
x-x_2 & y-y_2 & z-z_2 \\
x-x_3 & y-y_3 & z-z_3 \\
\end{vmatrix} =
\begin{vmatrix}
x-x_1 & y-y_1 & z-z_1 \\
x_1-x_2 & y_1-y_2 & z_1-z_2 \\
x_1-x_3 & y_1-y_3 & z_1-z_3 \\
\end{vmatrix} =0.
\end{eqnarray*}
Nothing went wrong, just use elementary row operations ! Subtract the first row from the second and third, to recover the form stated in the book \begin{eqnarray*} \begin{vmatrix} x-x_1 & y-y_1 & z-z_1 \\ x-x_2 & y-y_2 & z-z_2 \\ x-x_3 & y-y_3 & z-z_3 \\ \end{vmatrix} = \begin{vmatrix} x-x_1 & y-y_1 & z-z_1 \\ x_1-x_2 & y_1-y_2 & z_1-z_2 \\ x_1-x_3 & y_1-y_3 & z_1-z_3 \\ \end{vmatrix} =0. \end{eqnarray*}