Answer;
They must not have the same temperature.
Explanation;
They must not have the same temperature to have the amount of thermal energy, however, it also depends on how many particles it contains because one glass may have more water.
Thermal energy is determined by; the temperature of an object, the number of particles and also how the particles are arranged.