A variable W varies partly as M and Partly inversely as P. Which of the…