Sort Files
sort Name.txt -o Name.txt
sort Firstname.txt -o Firstname.txt
Merge the two files on the first column
join -o 0,2.1,1.2 Name.txt Firstname.txt > User.txt
Results should be like this
1 John Smith
2 Jane Doe
3 Jung Kim
3 Un Kim
4 Mickey Mouse