A rectangular prism has a total surface area of 48. Also, the sum of all the edges of the prism is 40. Find the length of the diagonal joining one corner of the prism to the opposite corner.
The length of the diagonal is 5*sqrt(2).