I'm guessing both highway and driveway are streight lines and that driveway is perpendicular to highway wich would mean that Smiths house, connection box and driveway-highway crossroads make vertices of right angle triangle.
Now you have two options:
1. Run cable over 5 mi of highway + 2 mi of driveway
`cost=5 cdot 10 + 2 cdot 14 =78`
2. Run cable streight from connection box to the house that is over hypotenuse of triangle. Let us first calculate the length of hypotenuse `c = sqrt(2^2 + 5^2) =sqrt(29)`
`cost = 14c = 14sqrt(29) approx 75.3923`
In case 2 cost is lower implying that the company should run the cable directly from connection box over the farmland to Smiths house.