We have $2x^2+8x+2\equiv 0\pmod{23}$ if and only if $x^2+4x+1\equiv 0\pmod{23}$.
Now complete the square. We have $x^2+4x+1=(x+2)^2-3$. So we want to solve the congruence $(x+2)^2\equiv 3\pmod{23}$.
Let $y=x+2$. We want to solve the congruence $y^2\equiv 3\pmod{23}$.
There is general theory that, for large $p$, helps us determine whether a congruence $y^2\equiv a \pmod{p}$ has a solution, and even to compute a solution. But at this stage you are probably expected to solve such things by inspection.
Note that $y\equiv 7\pmod{23}$ works, and therefore $y\equiv -7\equiv 16\pmod{23}$ also works. We have found two solutions, and by general theory if $p\gt 2$ there are either $2$ solutions or none, so we have found all the solutions.
From $y\equiv 7\pmod{3}$ we conclude that $x+2\equiv 7\pmod{23}$, and therefore $x\equiv 5\pmod{23}$.
From $y\equiv 16\pmod{23}$ we conclude that $x\equiv 14\pmod{23}$.
Remarks: If our congruence had been (for example) $x^2+7x-8\equiv 0\pmod{23}$, there would be a bit of unpleasantness in completing the square, since $7$ is odd. But we could replace $7$ by, say, $30$, and complete the square to get $(x+15)^2-225-8$. So our congruence would become $(x+15)^2\equiv 233\pmod {23}$, or equivalently $(x+15)^2\equiv 3\pmod {23}$.
In general, if we have $ax^2+bx+c\equiv 0\pmod{p}$, it is useful to multiply through by the inverse of $a$ modulo $p$ to make the lead coefficient equal to $1$. There are a number of other helpful "tricks."
As $3$, for instance, is prime to $10$, we can apply Euler's theorem: $3^4\equiv 1\mod 10$, hence
$$\bigl(3^5\bigr)^7=3^{35}\equiv3^{35\bmod4}\mod 10=3^3\equiv 7\mod 10.$$
As to $8$, which is not coprime to $10$, its powers modulo $10$ follow this pattern:
$$\begin{array}{c|cccccc}
n&1&2&3&4&5&\dots\\
\hline
8^n&8&4&2&6&8&\dots
\end{array}$$
so $8^n\equiv 8^{n\bmod4}\mod 10$ if we agree to represent integers modulo $4$ by a number in $\{1,2,3,4\}$ instead of $\{0,1,2,3\}$. Thus $$\bigl(8^{5}\bigr)^4=8^{20}\equiv8^4\equiv 6.$$
Best Answer
If $1-n$ is a modular inverse, then so is $(1-n) + kn^2$ for any integer k. In your case, to get the inverse between $0$ and $n^2$, you can take $k=1$ to get the inverse as $n^2-n+1$.