I'll try and explain it step by step, please correct me if I'm wrong.
Lets take a random matrix,
[tex]\begin{bmatrix}1 & 2 & 3 \\ 0 & 4 & 5 \\ 1 & 0 & 6 \end{bmatrix}[/tex]
Then you take the cofactor of each element.
To find the cofactor take the element, eg. [itex]A_{11}[/itex] then you delete the row and column that the elment is in. Then you find the determinant of the resultant matrix.
So for our matrix,
[itex]A_{11}[/itex], so delete row 1 and column 1.
This leaves us with,
[tex]\begin{bmatrix} 4 & 5 \\ 0 & 6 \end{bmatrix}[/tex]
Then take the determinant of that matrix.
[tex]\begin{vmatrix} 4 & 5 \\ 0 & 6 \end{vmatrix}[/tex] = ad-bc = 4 * 6 - 5 * 0 = 24.
So the first element, [itex]A_{11}[/itex], of the cofactor matrix is 24.
[tex]\begin{bmatrix}24 & ? & ? \\ ? & ? & ? \\ ? & ? & ? \end{bmatrix}[/tex]
Just repeat the steps for the rest of the elements.