All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The money that your friend earned from a lawful job is in itself lawful money and he is permitted to own it because it is in return for his effort.
However, he is sinful for not abiding by the law because a Muslim is obliged to abide by the laws of the country that he enters with a covenant (visa) if they do not contradict the Sharee’ah, as this is within the terms and conditions of the covenant, as Allaah Says (what means): {And fulfill [every] commitment, Indeed, the commitment is ever [that about which one will be] questioned.} [Quran 17:34]
Allaah further Says (what means): {O you who have believed, fulfill [all] contracts.} [Quran 5:1] Besides, the Prophet, sallallaahu ‘alayhi wa sallam, said: ''Muslims should abide by their conditions, except a condition that makes unlawful what is lawful or makes lawful what is unlawful." [At-Tirmithi]
Allaah Knows best.