The first sentence which says "Elena is older than Juan" has the comparative form "mayor que" and the second sentence which says "Elena es menor que Juan" has the comparative form "menor que" in order to compare the age of two different people (Elena and Juan). The comparative form is used to compare two different things or situations.