How can two containers of water have the same temperature but different amounts of heat energy?

Heat is stored in the matter and its motion. The more matter, or the more motion, the more energy it has.