let s is the money Sam makes hourly and j is the money Joe makes in an hour.
we have s=j-2 and 40(s+j)=440 --->>>> plugging the value s=j-2 to the second equation we get
40(j-2+j)=440 --->>> 40(2j-2) =440 --->>> 40*2(j-1)=440 --->>> 80(j-1)=440 deviding by 80 both sides
we get; j-1=5.5 --->>> j=6.5 so s=6.5-2=4.5 so Sam makes 4.5 $ an hour