I want to change my thesis topic (to the extent that the ethos is still in tact) but my advisor does not agree. What can I do?
The problem that you are facing is that your supervisor is not necessarily wrong to say:


  He says that he is an expert in B and his vision of the group is not inclined with me trying other things.


As hard as this sounds, as the head of a research group one needs to make sure that the people in the group follow some sort of unifying theme or vision. Otherwise, it is basically impossible to build any sort of profile. I am personally not a big fan of visions that resolve around a specific tool rather than a problem set or topic, because this often leads to the kind of research that boils down to "we have a hammer, and use it to punch whatever problem we can think of", but unquestionably a lot of research groups work like that. It also makes sense on some level, because in many fields techniques are more difficult to master than learning new problems and application domains, so it makes sense to keep the thing constant that is hard to learn and vary the things that are easier to get into from scratch.

Realistically, if 'B' is actually useless for your project, and your supervisor is adamant that you need to be using 'B', you can either change what you are trying to accomplish (the 'A' in your terminology), or change supervisor. That being said, depending on what you mean with 'preliminary results', this seems far from obvious to me.


  Another query is, is it ethical to collaborate with people outside the university (of course after letting my supervisor know) for my PhD work. My Masters supervisor would be happy to help me out.


Ethical? Sure - but that does not mean that your supervisor needs to be happy about it or let you do it if (s)he perceives that your main work suffers from it. Look around on this site on the topic of side projects - this has been discussed a number of times here.