Solve the indeterminate equation: $ad-bc=p$ for a prime integer $p$ How to solve the indeterminate equation: $ad-bc=p$ for a prime integer $p$?
The origin of this problem is the following question:
Show that rank-2 free $\mathbb Z$ module $\mathbb Z^2$ has $p+1$ submodules $N$ of index $p$.
$\mathbb Z^2$ can be viewed as a subset in the complex plane $\mathbb C$.  It is known that the index can be computed directly: 

$| \ \mathbb Z^2 : N| $ is exactly the area of the smallest
  parallelogram in $N$ i.e. if $z_1=a+bi$ and $z_2=c+di$ are two basis of $N$
  then the index will be the area of parallelogram spanned by $z_1$ and $z_2$. Hence,$| \ \mathbb Z^2 : N| $ is equal to $|ad-bc|$

 A: It does not really nswer the question you originnaly posted, but here's a hint for the second question if you're looking for one : (I hope this works)
To tackle the second question you posted, I can give you a hint : Consider $G=\mathbb{Z}^{2}$. Now we are looking for subgroups H of index $p$, hence $G/H$ is a group of order $p$ hence cyclic. For that, we can look at the surjective homomorphisms from $G$ to $\mathbb{Z}/p\mathbb{Z}$. Notice any non trivial such homomorphism is surjective! Now you can prove that the set $Hom(\mathbb{Z}^{2},\mathbb{Z}/p\mathbb{Z})$ is an $\mathbf{F}_{p}$ vector space, with operations you can determine, now to compute the dimension, you can closely mimic the proof of the "dual space of a vector space", and you can see that there are $p^{2}$ such homomorphism.Now we are looking for surjective ones, and so,in this cases for non trivial ones, hence we have $p^{2}-1$ such homomorphisms! But wait, two such homomorphisms have the same kernel if and only if they are a non zero scalar multiple of each other! Since we have $p-1$ non zero scalars, we have $\frac{p^{2}-1}{p-1}=p+1$ such subgroups! 
