Let $g(x) = (x^8+x^4+x^3+x+1)$ and $p(x) = (x^7+x+1)$
The GCD is correct and it is $1$ as the last non zero remainders.
\begin{align} (x^8+x^4+x^3+x+1) &= (x^7+x+1)(x) + \color{blue}{(x^4+x^3+x^2+1)}\\ (x^7+x+1) &= (x^3+x^2+1)\color{blue}{(x^4+x^3+x^2+1)} + \color{red}{(x)}\\ (x^4+x^3+x^2+1) &= (x^3+x^2+x)\color{red}{(x)} + 1\\ \end{align}
Now collect back to find to reach Bezout identity and we want to keep $g(x) $ and $p(x)$
$$(x^4+x^3+x^2+1) = (x^3+x^2+x) \color{red}{(x)} + 1$$ change to (in $GF(2)$ we have $-1=1$)
$$1 = (x^4+x^3+x^2+1) + (x^3+x^2+x) \color{red}{(x)}$$
Now substitute $\color{red}{(x)}$ from the previous
$$(x^7+x+1) = (x^3+x^2+1)\color{blue}{(x^4+x^3+x^2+1)} + \color{red}{(x)}$$
that is
$$\color{red}{(x)} = p(x) + (x^3+x^2+1)\color{blue}{(x^4+x^3+x^2+1)}$$
now substitute
\begin{align} 1 &= \color{blue}{(x^4+x^3+x^2+1)}) + (x^3+x^2+x)\big[(p(x) + (x^3+x^2+1)\color{blue}{(x^4+x^3+x^2+1)}\big]\\ 1 &= \color{blue}{(x^4+x^3+x^2+1)}) + (x^3+x^2+x)p(x) + (x^6 + x^2 + x)\color{blue}{(x^4+x^3+x^2+1)})\\ 1 &= (x^3+x^2+x)p(x) + (x^6 + x^2 + x +1)\color{blue}{(x^4+x^3+x^2+1)})\\ \end{align}
Now substitute $\color{blue}{(x^4+x^3+x^2+1)}$ from the first equation
$$g(x) = p(x)(x) + \color{blue}{(x^4+x^3+x^2+1)}$$
$$\color{blue}{(x^4+x^3+x^2+1)} = p(x)(x) + g(x)$$
\begin{align} 1 &= (x^3+x^2+x)p(x) + (x^6 + x^2 + x +1) \big[p(x)(x) + g(x)\big]\\ 1 &= (x^3+x^2+x)p(x) + (x^7 + x^3 + x^2 + x) p(x) + (x^6 + x^2 + x+1) g(x))\\ 1 &= (x^7 ) p(x) + (x^6 + x^2 + x) g(x))\\ \end{align}
Now that modulo $g(x)$ of both sides
$$1 = (x^7 ) p(x) $$ and this implies inverse of $p(x)^{-1} = x^7$
Note: for the field calculations I've used a Sagemath code as below, and this can be used for AES calculations.
#Base field
R.<y> = PolynomialRing(GF(2), 'y')
#Defining polynomial
G = y^8+y^4+y^3+y+1
#The field extension
S.<x> = QuotientRing(R, R.ideal(G))
S.is_field()
#this is zero
X = x^8+x^4+x^3+x+1
print(X)
#GCD
print(X.gcd(x^7+x+1))
#to find and inverse use the 1/
1/(x^7+x+1)
#field calculations
(x^3+x^2+1)* (x^4+x^3+x^2+1) + (x)