Regarding quadratic congruences in the form, where p i s a prime

1. How exactly do you solve for quadratic congruences in this form?

This is an example from online: , then and . I do not understand the jump from the first step to the next.

2. In this form, :

From one website, it said to:

i.Let and

ii. Then get which is the I have above

ii. Then substitute y = 2ax + b back into the solutions of and solve for x.

*How do you solve for a linear congruence in this form (for example):

Thank you for reading. Any help is greatly appreciated.