The tower represents the short side of a 30°-60°-90° right triangle. The distance from the tower represents the long leg, not the hypotenuse, of that triangle. It is √3 times the short side. In this geometry, man B is 100√3 = 173.2 meters from the tower.
The tower represents one of two congruent sides of a 45°-45°-90° right triangle. Man A will be standing 100 meters from the tower.
The distance between A and B is 100 +173.2 = 273.2 meters. The men are about 273 meters apart.
For this problem you are given the vertical and horizontal sides of the triangle. The flagpole (6.5 meters) is the up-and-down triangle side and the distance from the hook to the flagpole is the base (5.2 meters) of the triangle.