Computing a determinant by factoring a common factor from the resulting last row? The question is attached in the image, with the given hint:

Add all the rows to the last. Factor out a common factor from the resulting last row, which will then become a row of 1’s. Subtract this row from all the previous rows.

This is confusing to me. I know you can change the rows of a determinant by adding multiples of other rows without changing the actual determinant, but the "factor out a common factor" part is throwing me. I don't have any real work to write down because I literally don't know how to start, so that would be helpful.

First note that if a row of A is multiplied by $k$ then the determinant of the resultant matrix is $k|A|$. In the given example, using the hints, we have $$|A| = \left|\begin{matrix}-1 & 1 & \cdots & 1 \\ 1 & -1 & \cdots & 1\\\vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \cdots &-1\end{matrix}\right| = \left|\begin{matrix}-1 & 1 & \cdots & 1 \\ 1 & -1 & \cdots & 1\\\vdots & \vdots & \ddots & \vdots \\ n-1 & n-1 & \cdots &n-1\end{matrix}\right|, \tag 1$$ where the size of $A$ is $n \times n$.
Consequently, $$|A| = (n-1)\left|\begin{matrix}-1 & 1 & \cdots & 1 & 1 \\ 1 & -1 & \cdots & 1 & 1\\\vdots & \vdots & \ddots & \vdots & \vdots \\ 1 & 1 & \cdots &-1 &1 \\1 & 1 &\cdots&1 &1\end{matrix}\right|. \tag 2$$
$$|A| = (n-1)\left|\begin{matrix}-2 & 0 & \cdots & 0 & 0\\ 0 & -2 & \cdots & 0 & 0 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & -2 & 0\\1 & 1 & \cdots & 1 &1\end{matrix}\right|=(n-1)(-2)^{n-1}. \tag 3$$