This is an old physics olympiad problem, I think. The answer hinges on the spheres expanding due to heating. Sphere A raises its center of mass some and sphere B lowers its center of mass some. By conservation of energy sphere A is thus slightly colder, since more of its energy went into its gravitational potential.
It's a bit of a silly problem since the effect is extremely small. We can see this because from common experience if you heat a metal sphere $10 C$, the change in radius is pretty small - so small you probably won't notice without measuring it or else having something with a different expansion coefficient wrapped around the sphere. Meanwhile, if you drop a fist-sized a metal sphere by $1cm$, a distance much larger than such a sphere would expand with a $10 C$ change, the temperature change is much, much smaller than $10 C$. It's smaller than you can even notice, really. So the gravitational potential change is very small compared to the heat, and the difference in temperatures is minute.