I see in a previous incarnation of your question you showed your sample input as screenshots of what appears to be excel spreadsheets and someone else actually replaced those with the space-separated textual input example. Given that, I'm going to assume your input will actually be comma-separated since that's a common Excel export/import format in which case it'd look like:
$ head file{1,2}
==> file1 <==
a,b,nSites,J9
0,1,3092845,1
0,2,3139733,1
0,3,3339810,1
0,4,3124263,1
==> file2 <==
SF10,0
SF11,1
SF12,2
SF13,3
SF14,4
Given that, using any awk:
$ awk 'BEGIN{FS=OFS=","} NR==FNR{map[$2]=$1; next} FNR>1{$1=map[$1]; $2=map[$2]} 1' file2 file1
a,b,nSites,J9
SF10,SF11,3092845,1
SF10,SF12,3139733,1
SF10,SF13,3339810,1
SF10,SF14,3124263,1
Original answer when assuming the input was space-separated (tabs and/or blanks):
Using any awk, in case that's OK instead of sed: