The man on the 45 degrees side:
Tan(45) = Opp / Adj (rearranging we get . . .)
Adj = Opp / Tan(45) = 20 / 1 = 20m
The man on the 60 degrees side:
Tan(60) = Opp / Adj (rearranging we get . . .)
Adj = 20 / Tan(60) = 20 / 1.732 = 11.547m
Therefore the distance between the two men is 20 + 11.547 = 31.547m