Calculating Decimal points of modulo operations

arithmeticcryptographymodular arithmetic

I am not too sure of the step that has occurred here (I found this form a cryptography book but I do not understand how he finds the second 9).

The function found in the image is
$(2 \cdot 1)^{-1}(3 \cdot 5^2 + 2) = 2^{-1} \cdot 9 \equiv 9 \cdot 9 \equiv 13\,\mod\,17$

My calculations are that:
$(2 \cdot 1)^{-1}(3 \cdot 5^2 + 2) = 2^{-1} \cdot 9 = 4.5 \not\equiv 9 \cdot 9 \equiv 13\,\mod\,17$

Equation from Book

Best Answer

How he finds the second $9$:

$2^{-1}\equiv9\pmod{17}$ because $9\cdot2=18\equiv1\pmod{17}$