That is legal. The rules only specify that you place your tiles along the same vertical or horizontal line, and must be adjacent to tiles already on the board in at least one place.
Your friend formed three new words with his play: ax, ax, and ea. If you think any of them are not valid words, you can challenge his turn.
Here is another example of a word AXION played alongside another word TINT:
(Image cropped from https://img.wonderhowto.com/img/91/78/63406678713167/0/master-scrabble-win-every-game.w1456.jpg)
Imagine TINT was already on the board, and AXION is the new word just played next to it. AXION is a completely permissible play because AT, XI (a greek letter), and IN are also words.
The player gets the points for AXION, AT, XI, and IN. The X is on a triple letter, and its points are tripled in every word it is in.
AXION is 1 + 8*3 + 1 + 1 + 1 = 28 points.
AT is 1 + 1 = 2 points.
XI is 8 * 3 + 1 = 25 points.
IN is 1 + 1 = 2 points.
So this example would have been a legal 57 point play.
Your friend should have scored 52 points for his turn by the way, if you accept EA (which might not be a valid word depending on the dictionary you're playing by).