The text says to take a division problem and put it in the format of, math homework help

I’m am reading my textbook, but I’m having a hard time understanding how they got to the 

step.

The text says to take a division problem and put it in the format of

b/a = b * a-1 mod m

And that the inverse a-1 of a number is defined such that

a a-1 = 1 mod m

Problem: what is 5/7 mod 9?

The explanation given in the text.

“The inverse of 7 mod 9 is 4 since 7*4= 28=1 mod 9”

I can’t figure out where the 4 comes from.

I used the equations from the above, but I don’t see how the 4 comes about.

( 7*7-1 = 1 mod 9 )= ( 1 = 1 mod 9) ?