Reading it again, my solution was not even correct for the case where stereo and speaker are on the floor.
I was thinking you had to run the wire along the wall. If you can run it straight across the floor, the distanc to the opposite corner,
still on the floor, is given by the Pythagorean theorem- a diagonal of a rectangle with sides of length 12 and 10 is
[itex]\sqrt{12^2+ 10^2}= \sqrt{244}= 2\sqrt{61}[/tex]. To run the wire up to a speaker on the ceiling,
add the 8 foot height.
That is not a correct solution. This is a variation of the "spider and the fly" puzzle.
Make an open box with the width, length, and height in the ratio of 10:12:8.
Fold down the sides of the box so that it is in a plane. Connect the corner (stereo) to the corner
where the speaker is with a line. Draw the line on the paper.
This forms a diagonal of a rectangle that is (10 + 8) units by 12 units. The minimum distance is
\(\displaystyle \sqrt{18^2 + 12^2} \ = \ \sqrt{468} \ \approx \ 21.6333 \ \ (units.)\)
Fold the paper back into an open box and see that the line is across the a portion of the floor
(but not the floor diagonal) and diagonally on a portion of a wall.
- - -
This distance is shorter than the last method/(intended solution) given by HallsofIvy.
The shortest distance is about 21.6333 feet.
Edit:
Subhotosh Khan stated after this post: "This is a classic fly walking on wall problem. "
Yes, I already stated to that effect at the top of this post.
Also, I deleted one of my posts.