Im give the equation $ 2x \equiv 5\pmod 9 $ and am told to solve for the linear congruence. I attempted to this with only the methods taught to me and no more so i cannot use Bezout's Identity or a Diophantine Equation. I can only use Extended Euclid's algorithm and use modular arithmetic from there.
$ 9 = (2)4+1$ (Find GCD)
$1 = (1)9 -4(2)$ (Solve 1 in terms of 9 and 2)
$1 \equiv 9 -4(2) \pmod 9$ (Rewrite equivalence with new inverse)
$9-4 = 5 $ (Finding equivalent positive multiplicative inverse)
$(5)2x \equiv (5)5 \pmod 9 $ (Go back to original equation and multiply each side by the inverse)
$x = 25 \pmod 9$ (The left side becomes x because $5*2 \pmod 9 = 1$)
$x = 7$ (Result)
I cannot find a single calculator online that confirms this answer. Quite honestly different calculators are giving me different answers so I'm not even quite sure if mine is wrong or not. Is this right or is there something wrong in my steps?