In general, to find the inverse of an invertible #nxxn# matrix, we can augment that matrix with the identity matrix and then perform elementary row operations to change the left initial matrix to the identity matrix. The resulting augmented portion will be the inverse.
#(A|I) -> (I|A^(-1))#
Proceeding:
#(A|I) = ((1,0,1,|,1,0,0),(2,0,1,|,0,1,0),(2,1,3,|,0,0,1))#
#R_2-2R_1#
#R_3-2R_1#
#((1,0,1,|,1,0,0),(0,0,-1,|,-2,1,0),(0,1,1,|,-2,0,1))#
#R_2 harr R_3#
#((1,0,1,|,1,0,0),(0,1,1,|,-2,0,1),(0,0,-1,|,-2,1,0))#
#-1*R_3#
#((1,0,1,|,1,0,0),(0,1,1,|,-2,0,1),(0,0,1,|,2,-1,0))#
#R_1-R_3#
#R_2-R_3#
#((1,0,0,|,-1,1,0),(0,1,0,|,-4,1,1),(0,0,1,|,2,-1,0)) = (I|A^(-1))#
Thus we have #A^(-1) = ((-1,1,0),(-4,1,1),(2,-1,0))#.
Checking our result, we find that #A A^(-1)=I#, as desired.