Let us fix a matrix $A$, so that the answer can be recovered every time.
Since big coefficients should not occur on such a post, let us work over
`F = GF(5)`

first. We start with the matrix:

F = GF(5)
A = matrix( F, 5, 5, [ 1 + k^2 + n^3 for k in F for n in F ] )

This is:

```
sage: A
[1 2 0 0 2]
[2 3 1 1 3]
[0 1 4 4 1]
[0 1 4 4 1]
[2 3 1 1 3]
```

Now, if the (pythonically numbered) rows $1,2$, and the columns $0,4$ have to be deleted, we have to extract (complementarily)
the rows $0,3,4$, and the columns $1,2,3$. This is done for instance via:

```
sage: A[ [0,3,4] , [1,2,3] ]
[2 0 0]
[1 4 4]
[3 1 1]
```

For our purposes, it is better to use the form:

```
R = range( 5 )
A[ [ k for k in R if k not in [1,2] ] ,
[ k for k in R if k not in [0,4] ] ]
```

This is the same.

And now the answer to your question:

```
R = range( 5 )
S = set( R )
F = GF(5)
A = matrix( F, 5, 5, [ 1+k^2+n^3 for k in F for n in F ] )
B = matrix( F,
5, 5,
[ A[ list( S.difference( {j,k}) ) ,
list( S.difference( {j,k}) ) ].det()
for j in R
for k in R ] )
```

This is:

```
sage: B
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
```