Because a is pointing to A in fact, not a B, then dynamic_cast will fail.
Is it possible to downcast using dynamic_cast?
Yes, you can, e.g. if a points to B exactly,
A* a = new B; B* b = dynamic_cast<B*>(a);
See http://en.cppreference.com/w/cpp/language/dynamic_cast
5) If expression is a pointer or reference to a polymorphic type Base, and new_type is a pointer or reference to the type Derived a run-time check is performed:
a) The most derived object pointed/identified by expression is examined. If, in that object, expression points/refers to a public base of Derived, and if only one subobject of Derived type is derived from the subobject pointed/identified by expression, then the result of the cast points/refers to that Derived subobject. (This is known as a "downcast".)
...
c) Otherwise, the runtime check fails. If the dynamic_cast is used on pointers, the null pointer value of type new_type is returned. If it was used on references, the exception std::bad_cast is thrown.
atoB*, because it doesn't point to aB, it points to aA:Ais not aB. You could however cast aB*to aA*because theB*would point to a B, which "is a" A (definition of inheritance)