Answer
$7.96 \ \mathrm{m} $.
Work Step by Step
$See\ image\ Below: \downarrow$
Suppose that path of fly shown by dotted lines on diagram (below left). imagine there is hinge where front wall of room joins the floor & lay wall down as shown (above right).
The shortest walking distance between the lower left back of the room and the upper right front corner is the dotted straight line shown in the diagram. Its length is
$$S_{\min }=\sqrt{(w+h)^{2}+l^{2}}=\sqrt{(3.70 m+3.00 m)^{2}+(4.30 m)^{2}}=7.96 m$$
To show that the shortest path is indeed given by $s_{\text { min }},$ we write the length of the path as
$$
s=\sqrt{y^{2}+w^{2}}+\sqrt{(l-y)^{2}+h^{2}}
$$
The condition for the minimum is given by
$$\frac{d s}{d y}=\frac{y}{\sqrt{y^{2}+w^{2}}}-\frac{l-y}{\sqrt{(l-y)^{2}+h^{2}}}=0$$
A little algebra shows that the condition is satisfied when $y=l w /(w+h),$ which gives
$$s_{\min }=\sqrt{w^{2}\left(1+\frac{l^{2}}{(w+h)^{2}}\right)}+\sqrt{h^{2}\left(1+\frac{l^{2}}{(w+h)^{2}}\right)}=\sqrt{(w+h)^{2}+l^{2}}$$
Any other path would be longer than $7.96 \ \mathrm{m} $.