Rearrange the formula to isolate w: P = 21 +2w.