#### Answer

The distance between the two factories is 1473 m

#### Work Step by Step

Let the man be standing at point C. Suppose he hears the whistle from the factory at point A after 3 seconds. The distance $AC$ is $(3~s)\times (344~m/s)$ which is $1032~m$
Suppose he hears the whistle from the factory at point B after 6 seconds. The distance $BC$ is $(6~s)\times (344~m/s)$ which is $2064~m$
Note that the angle at point $C$ is $42.2^{\circ}$.
We can use the law of cosines to find the length $AB$, which is the distance between the two factories:
$AB^2 = AC^2+BC^2-2(AC)(BC)~cos~C$
$AB = \sqrt{AC^2+BC^2-2(AC)(BC)~cos~C}$
$AB = \sqrt{(1032~m)^2+(2064~m)^2-(2)(1032~m)(2064~m)~cos~42.2^{\circ}}$
$AB = \sqrt{2169221.3~m^2}$
$AB = 1473~m$
The distance between the two factories is 1473 m