Using two outputs

Normally there's no reason to change the standard frequency that analogWrite() uses. It is something that is done infrequently, mostly because the standard frequency is within the range of hearing and you want to stop the motor making the whining noise.

Look up the online resources on changing the analogWrite() frequency.

However, in this application, I fail to see why that frequency is important. This website may help: www.xyproblem.info