Rearrange the formula P=3w−7w+4m\displaystyle P = \frac{3w - 7}{w + 4m}P=w+4m3w−7 to make w w\,w the subject.