Here is a geometrical approach.
The expression $ad - bc$ is a determinant of matrix $ M =\left(\begin{smallmatrix} a &b \\ c &d\end{smallmatrix}\right)$ and $n$ is a sum of coordinates af the point $X = Mv_1$, where $v_1 = \left(\begin{smallmatrix} 1 \\ 1\end{smallmatrix}\right)$. The problem is equivalent ot the following
Statement. Let $X = (p, n - p)$ be a point on the line $x + y = n$ with non-negative integer coordinates.
- If there exists matrix $M$ with $\text{det}M = 1$ such that $Mv_1 = X$ then $(n, p) = 1$;
- If $(n, p) = 1$ then there exists a unique matrix $M$ with the same properties.
Proof: We start with the first part. Denote $v_2 =\left(\begin{smallmatrix} 1 \\ 0\end{smallmatrix}\right)$ and let $Y = Mv_2$ be the image point of $v_2$.
Matrix $M$ has unit determinant hence it preserves the area and consequently $S_{XOY} = \frac{1}{2}$. Now from the Pick's theorem applied to the $XOY$ we get that there are no integer points on the segment $OX$ except $O$ and $X$; therefore $(p, n - p) = 1$.
Now assume that $p$ and $n$ are coprime. To show the existence take $Y$ as a vertice of a triangle with the smallest possible area $S_{OXY}$. Again, by Pick's Theorem, its area equals to $1/2$ and therefore $\text{det} M = 1$.
Uniqueness can be show as follows: assume that there are two different points $Y_1$ and $Y_2$.
Equality of the areas implies that $OX\parallel Y_1Y_2$. However the segment $Y_1Y_2$ is shorter than $OX$.Thus, the point $Y_3$ corresponding to the vector $Y_2 - Y_1$ (or $Y_1 - Y_2$) is on the segment $OX$, which is a contradiction.