So, the to enclose the two adjacent rectangles, we need to the find the perimeter of the outer rectangle
So, the perimeter =
[tex]2\cdot\text{ (50}\frac{5}{8\text{ }}+30\frac{2}{9})=2\cdot\frac{5821}{72}=161.7\text{ yard}[/tex]the fencing cost is $25.8
So, the total cost = 161.7 * 25.8 = $4171.72
so, the distance around the outside = 161.7 yard
And the cost = $4171.72