Rather than trying to fit a square peg through a round hole, you need to refactor your code to something that will actually work and make sense. Calling controller code from an attribute doesn't make sense.
Pull the IsValidUser method out of the Controller B, move it to a class called MyCustomAuthenticator and then call it like so
var auth = new MyCustomAuthenticator(); auth.IsValidUser();
But to answer your question exaclty as you asked, just instantiate the controller inside your attribute and call it that way. This is not a good idea.
public class MyCustomAuthorizeAttribute : AuthorizeAttribute
{
public void AnExampleMethodCuaseThereWasntOneHere()
{
var controllerB = new ControllerB();
controllerB.IsValidUser();
}
}
I don't know what "//If i reieve true the control should go to ControllerA MyMethod" means, it sounds like you want to do a redirect to Controller A but you need code used in Controller B to do so.
In short, the better option here is to refactor your code, this is a good example of situations where you come back to it in 5 months and not know whats going on with it.