Coffee would cool via heat being lost to the surroundings. This heat loss would be larger when the exposed surface area is larger. Now, whatever material makes up the cup, it would insulate heatheat somewhat, as against being held completely open, like the top surface. (That's one reason why ceramic cups are so common - if the cup doesn't insulate, its like holding the hot coffee right in your hand!)
So, Thethe taller and narrower cup (an example here) exposes lesslesser area to air and heat loss through a larger volume of coffee, in the interior, would stand minimizedbe reduced.
In comparison, an ''even dimensioned'' one (for example, this) has a relatively larger surface area exposed to air, which means more cooling.