I have a $b1=(3,9)$ $b2=(9,x)$, working in modulo 10, where x is unknown and I need to find an inverse matrix so I use Gaussian elimination.
I wrote$ \begin{bmatrix}3 & 9 \\9 & x \end{bmatrix}$ $\begin{bmatrix}1&0 \\0 & 1 \\ \end{bmatrix}$
I then said find the inverse of $3$ modulo $10$ which is $-3$, multiplied by the first row gives.
$ \begin{bmatrix}1 & 3 \\9 & x \end{bmatrix}$ $\begin{bmatrix}7&0 \\0 & 1 \\ \end{bmatrix}$
I then said, $R2$ - $9R1$->$R2$
which is
$\begin{bmatrix}1 & 3 \\0 & x-27 \end{bmatrix}$ $\begin{bmatrix}7&0 \\7 & 1 \\ \end{bmatrix}$
but i'm not sure what to do from here as I need $\begin{bmatrix}1 & 0 \\0 & 1 \end{bmatrix}$ on the left side but I dont know how to deal with the $x-27$
I guess it is the same as asking how to find the inverse of $x-27$ modulo $10$
We can start by noting $27=7$ modulo $10,$ but this isn't that helpful. Then comes the tricky part. Much like how $(x-1)^{-1}$ isn't defined if $x=1,$ we're going to have a similar problem. Unfortunately it's even worse modulo $10,$ because there are $0$ divisors that also don't have inverses.
This is a good exercise if you haven't seen it before, try finding an integer $a$ modulo $10$ such that $5a=1$ mod $10.$ There is none. The trouble is that $5 \cdot 2 =0$ mod $10,$ so if we found a working $a$ we would have: $2 = 1 \cdot 2 = (5a) \cdot 2 = a \cdot 0 = 0$ (all mod $10$), which gives a contradiction. Thus there cannot be such an integer $a.$
The $0$ divisors of $10$ are reasonably straightforward: $2,4,5,6,8$ the evens and $5$. So as long as $x-7$ is not in that set (mod $10$) an inverse exists. I don't recall a simple method for finding, say, a polynomial representation for the inverse. We can compute it for any given $x$ via Bezouts identity, or by guessing (there are only 4 options). So the valid inputs for $x$ are: $0, 4, 6, 8$ and the corresponding multiplicative inverses to $x-7$ are: $7, 3, 9, 1.$ one could write out the resulting inverses casewise, or fit a polynomial and note the bad cases. You could also continue manipulation with something like $\frac{1}{x-7}.$ Much like you would if $x$ were a real number.
It's also relatively direct to confirm that other values of x don't give an invertible matrix. Just compute the determinant and see if that number is invertible modulo $10.$