The Fire Elemental would take more damage.
The water elemental is not immune or resistant to fire damage. This would indicate that the fire elemental's fire form ability would damage the water elemental. The fire form ability can inflict damage in 2 different ways:
- A creature that touches the elemental or hits it with a melee attack while within 5 feet of it takes 5 (1d10) fire damage.
This would indicate the water elemental would take 1d10 damage if it enters the fire elemental's space, because they would be touching.
- When the fire elemental enters a hostile creature's space and
stops there, the fire form ability has three separate parts:
- the creature takes 5 (1d10) fire damage.
- the creature catches fire
- until someone takes an action to douse the fire, the creature takes 5 (1d10) fire damage at the start of each of its turns.
In #2 the first part is separate from the second two parts. There is no indication that catching fire causes the initial damage, it is presumably high levels of heat. However there is very clear indication that catching fire causes the additional damage on new turns (until someone takes an action to douse the fire...). And because it indicates that it can simply be doused, we can safely presume that it is non-magical fire that will be immediately doused by the water elemental's form.
So the water elemental would take the initial damage, but none thereafter.
However the water susceptibility trait of the fire elemental would also cause the fire elemental to take damage.
Water Susceptibility. For every 5 feet the elemental moves in water, or for every gallon of water splashed on it, it takes 1 cold damage.
In both cases above the two elementals are in the same space and touching, and I would consider that the same as splashing. It would be up to the DM to determine how much damage the fire elemental takes, but it would seem to me that it would be a lot more damage than the fire elemental would cause to the water elemental. A water elemental is listed as Large and I would guess made of at least 100 gallons, that's up to 100 hp damage to the fire elemental. The fire elemental wouldn't get all that damage, maybe 1 - 3 d10 depending on the situation.