The two cities, A(0,a) and B(b,-c), are separated by a river (river's banks are defined by y=0 and y=a/10).
A bridge, about to be erected must be perpendicular to river's banks (i.e. line x=d).
Evaluate d to minimize the travel distance between A and B.
There is a translation trick to find the slope easily: translate the river until one of its banks coincides with city A. Then find the slope of the line from the other end of the bridge to city B. Both sloped roads in the original configuration will share that slope.
After translation other end of the bridge is at (0, 9a/10). The slope from this point to B at (b,-c) is -(9a/10 + c)/b.
Back to the original configuration. The line of the road starting at city A is then y - a = -(9a/10 + c)/b * (x - 0), which simplifies to y = -(9a/10 + c)/b * x + a.
The line of the road starting at city B is then y - -c = -(9a/10 + c)/b * (x - b), which simplifies to y = -(9a/10 + c)/b * (x -b) - c.
Evaluate the first line at y=a/10 and the second line at y=0. These should give the same answer for x, the expression for d.
The first line becomes a/10 = -(9a/10 + c)/b * x + a, which simplifies to x=9ab/(9a+10c).
The second line becomes 0 = -(9a/10 + c)/b * (x -b) - c, which also simplifies to x=9ab/(9a+10c).
Then the answer is d = 9ab/(9a+10c).