i'm gonna assume that "leg" refers to length of the triangle, so comment if you think it is wrong.
Now when it comes to a right-angled triangle, the pythagoras theorem formula can be used.
Using algebra,
let the missing length be X.
By pythagoras theorem,
5² = 3² + X²
5² - 3² = X²
X² = 5² - 3²
X = sq root ( 5² - 3² )
= 4 m
Therefore, the length of the missing leg is 4m .