If you can post the actual code we may be able to provide a better answer.
But from what I understand of your question, you can solve this by passing an object of type ClassB to the ClassA function that adds values to VectorA. The function would take whatever field it needs from the ClassB object (by calling a getter), and add it to VectorA.
Or you can make a class B method a friend of class A. 2 things to bear in mind:
a. forward declaration of B before A
b. the friend function should take as argument class A object as non const reference