Need help about some commands.

What is the difference between these two methods of PWM?
1.
analogWrite(PWM2, correction);
digitalWrite(INA, HIGH);
digitalWrite(INB, LOW);
2.
analogWrite(INA, correction);
analogWrite(INB, LOW);

What is the difference between these two methods of PWM?

The primary difference is the pins involved.

Without knowing the values of your variables this answer might not be complete but here goes, and it’s probably more info than you need, but more info is better:

With analog write you can send a value from 0-255 out of a PWM pin and have the arduino look after the pulse width for you. A single command sets off a square wave set to a duty cycle based on the value sent in. So a value of 255 has the longest “on” pulse so it appears brighter.
But you can also send out LOW and HIGH from these pins. This is equivalent to a full on or full off like you would send out of a standard digital pin.
You don’t need to predefine the pin for an analogOut like you do for a digitalWrite.

Note: if the pin is not a PWM pin (usually labeled on an official arduino) you only have the choice of sending out either a HIGH signal or a LOW signal, and you do this with digitalWrite

Keep in mind that you can also send out 0’s and 1’s and they are equal to LOW and HIGH respectively but it doesn’t read as nice in the code. But it does work better if you want use a variable set to 0 or 1 (or FALSE or TRUE for that matter) to define whether you want to send a low or high signal.

Does that help?

You don't need to predefine the pin for an analogOut like you do for a digitalWrite.

sp. " you don't need to set the pinMode for an analogWrite like you do for a digitalWrite"