Nevertheless, to get the given formula the angle theta must be the angle between the horizintal line joining the two houses and the line joining the first house to the point on the road that Sally starts jogging from. It's also the acute angle between road and the line joining the point that Sally leaves the road from to the second house (so the path Sally follows is symmetric).
To answer the first question, you substitute the given value of theta into the formula. You're expected to know that and .....
From the diagram it should be clear that the total distance on the beach that Sally jogs is . Therefore the time Sally spends jogging on the beach is .
Therefore the time Sally spends jogging on the road is
Total time minus time on beach