This is from https://courses.cs.washington.edu/courses/cse311/14au/slides/lecture10-filled.pdf slide 25.
This is the definition of a is congruent to b modulo m. (from slide 24)

This is an example on the next slide, slide 25

I know that
is saying 17 divides A - (-1) or 17 divides A + 1, meaning
A + 1 = 17x where x is some integer, solving for A, you get
A = 17x - 1.
Where does 17x + 16 come from? Algebraically, that is not equal to 17x - 1.