Since you extend PApplet I'm assuming you are not working from the PDE, but from an external editor such as Eclipse. Unlike in the PDE, your other classes aren't inner classes to PApplet and as such don't have access to it's methods. However ControlP5 uses the parent PApplet, as follows from the line: cp5 = new ControlP5(this); Also I don't see where you initialize ControlP5 (supposedly in ClassA?), so maybe it's scope is even limited wherever it's initialized and not accessible to other objects. My guess it's related to either of these.
With regard to your goal. Wouldn't it be easier to use tabs to switch between different controller contents?