The space diagonal of a rectangular prism is the root of the sum of the squares of the edge lengths. The longest straight part that will fit in the box will be at most ...
To find the slope, you use rise/run. In this case... the rise is 5 up and the run is 1 across. Therefore it is 5/1 which is the same as 5. Hope this helped!