A hollow metal sphere with uniform charge, behaves as if the entire charge were concentrated at its centre; and since the electric field is zero inside, the electric potential is the same from surface to centre.
==> V = k * q / r (V - potential, q - charge, r - radius)
VA = k * 10 / 6 & VB = k * 6 / 3 ==> VA < VB.
Now, when the two spheres are connected by a wire, charges flow until their potentials become equal; charges that flow through the wire are free electrons and free electrons will travel from lower potential to higher potential i.e, from sphere A to B.
Note: However, conventional current flows from B to A.