<s>[INST] The function $g: \Bbb{Z}_{10} → \Bbb{Z}_{10}$ is defined by $g(x) ≡ 7x + 2 \mod 10$. Find its inverse function. Solution: From $x = g(y) ≡ 7y + 2 \mod 10$, we obtain
$$y ≡ 7^{−1}(x−2)≡3(x−2) \mod 10$$.
Hence, the inverse function $g^{−1}: \Bbb{Z}_{10} → \Bbb{Z}_{10}$ is defined by $g^{−1}(x) ≡ 3(x − 2) \mod 10$.
I don't understand the steps on how $7^{−1}(x−2)$ is logically equivalent $3(x−2) \mod 10$. I'm missing something, but I can't figure it out. Thanks in advance.
 [/INST] $7^{-1}\pmod {10}$ refers to the class $k$ so that $7*k\equiv 1 \pmod {10}$.  If such a class exists.  
An $a^{-1} \pmod n$ will exist if and only if $\gcd(a,n) = 1$.
So what is $7^{-1}\pmod {10}$.  What is the solution to $7*k\equiv 1 \pmod {10}$.
We could use Bezout and Euclid's alogorithm to solve $7k + 10a = 1$ but these are such simple and small numbers it's easier to use brute force.
The multiples of $7$ are $7,14\equiv 4, 21\equiv 1, 28\equiv 8, 35\equiv 5, 42\equiv 2, 49\equiv 7, 56\equiv 6, 63\equiv 3, 70 \equiv 0$.
So $7*3 \equiv 21 \equiv 1 \pmod {10}$.
And $7^{-1} = 3\pmod{10}$.
.......
So if $y= g(x) = 7x+2\pmod {10}$ the $g^{-1}$ is the function so that $x =g^{-1}(g(x)) = g^{-1}(y)$ so to find $g^{-1}$ we solve $y = 7x+2\pmod {10}$ for $x$ in terms of $y$.
$y \equiv 7x + 2 \pmod{10}$
$7x \equiv y - 2 \pmod{10}$.
$7^{-1}*7x \equiv 7^{-1}(y-2)\pmod {10}$
$3*7x \equiv 3(y-2)\pmod{10}$
$21x\equiv 3(y-2)\pmod{10}$
$x\equiv 3(y-2)\pmod{10}$
In my a opinion we should distribute the $3(y-2)$
So $x \equiv 3y - 6 \pmod{10}$.
Furthermore I think we should, for aesthetic purposes mostly, consistently use the postive reduced residue system.  $-6\equiv 4 \pmod {10}$
So 
$x \equiv 3y + 4 \pmod {10}$
And so $g^{-1}(y) = 3y+4\pmod {10}$ or replacing one variable with  another:
$g^{-1}(x) = 3x + 4\pmod {10}$
...
To verify this we wont to so if $g^{-1}(g(x)) = x$.
$3(7x+2) + 4 \equiv $
$21x + 6 + 4 \equiv $
$21x + 10 \equiv $
$x + 0 \equiv x\pmod{10}$.
And that $g(g^{-1}(x)) = x$.
$7(3x+4) + 2 \equiv $
$21x + 28 + 2 \equiv 21x + 30\equiv$
$x + 0 \equiv x \pmod {10}$.
</s>