Is this a correct solution to the linear congruence? I want to solve this linear congruence:
$$2x \equiv 5 \pmod{9}$$
Backward substitution:
$$9 = 4 \cdot 2 + 1$$
$$4(-2) + 9 = 1$$
Therefore, the inverse is: $-2$
Now multiply the linear congruence with $-2$
$$(2)(-2)x \equiv (-2)5 \pmod{9}$$
$$x \equiv -10 \pmod{9}$$
So:
$$x = 8 + 9k$$ for an integer $k$
EDIT:
With the answers given below, the solution is:
Therefore, the inverse is: $-4$
Now multiply the linear congruence with $-4$
$$(2)(-4)x \equiv (-4)5 \pmod{9}$$
$$x \equiv -20 \pmod{9}$$
$$x \equiv 7 \pmod{9}$$
So:
$$x = 7 + 9k$$ for an integer $k$

No, here goes something wrong. The inverse of 2 is 5 rather than -2. 
You should compute the inverse by the Extended Euclidean algorithm or perhaps you can guess it in a simple case with small numbers like this one. 
