It is better for the person to offer Tahiyyatul-Masjid according to the more correct of the two opinions of the scholars. This is due to the generality of the prophet's statement:
"When one of you enters the Masjid, he should not sit until he prays two Rak'ahs."
(Al-Bukhari no.1163 and Muslim no. 714)
This Hadith's authenticity is agreed upon (in Al-Bukhari and Muslim). However, if he sits and does not offer the prayer, there is no harm in that.