First of all, include is a command that read a php source file and treats it as it was written in place of the include directive. You can use it on any php source file and is not related to the class inheritance.
By the way, if you don't include the file containing the class A source code you can't extends that class.
Extendind a class with the keyword extends imply the concept of inheritance that is a key concept in object oriented programming.
You get a class (A) with some methods and need a similar class (B) with a slight different behaviour, you can derive the new class extendig the class A and modifying just the methods that have to change (it is called overriding) or adding new ones.
In opposite to the inheritance there is the composition. With the composition you don't extends a class to change its behavoiur instead you have to do a patchwork of classes in order to obtain the desired behaviour.
On wikipedia you can find a better explanation on object composition and class inheritance
It seems there is a little confusione on these concepts, as you extend your class A and, at the same time, you try to compose it (by the way, the correct syntax is $a=new B();).
A useful reference it, obviously, Gof, Design patterns