The length of the diagonal across the front of a rectangular box is 25 inches, and the length of the diagonal across the side of the box is 20 inches. The length of a 3 dimensional diagonal of the box is 28 inches. What is length of the diagonal across the top of box?

A. 15.5
B. 23.3
C. 45.9
D. 46.6

answer is B , but I can't come up with that answer, I come up with something else.

Let the length along the front be x

let the width be y
let the height be z

x^2+ z^2 = 25^2 = 625 , #1
y^2 + z^2 = 20^2 = 400 , #2
subtract them
x^2 - y^2 = 225 , #3

also x^2 + y^2 + z^2 = 28^2 = 784 , #4
add it to #3
2x^2 + z^2 = 1009, but x^2 + z^2 = 625 from #1
so

2x^2 + z^2 = 1009
x^2 + z^2 = 625
x^2 = 384
then from #1
z^2= 241
from #2
y^2 = 159

check:
#1 : x^2 + z^2 = 384+241 =625 , check
#2 : y^2 + z^2 = 159+241 = 400 , check
#4 : x^2 + y^2 + z^2 = 384+159+241=784 , check

so we need the distance D
D^2 = x^2 + y^2 = 384+159=543
D = √543 = appr 23.3

To find the length of the diagonal across the top of the box, we can use the Pythagorean theorem. Let's assume that the length, width, and height of the rectangular box are x, y, and z respectively.

According to the given information, the length of the diagonal across the front of the box is 25 inches. This means that the following relationship holds:

x^2 + z^2 = 25^2

Similarly, the length of the diagonal across the side of the box is 20 inches, which gives:

y^2 + z^2 = 20^2

Now, we need to find the length of the three-dimensional diagonal, which is the diagonal across the box's top. The relationship for this diagonal can be formed by using the Pythagorean theorem with all three dimensions:

x^2 + y^2 + z^2 = 28^2

From these equations, we can solve for x, y, and z.

First, let's solve for x. Rearranging the equation for the diagonal across the front, we have:

x^2 = 25^2 - z^2

Next, let's solve for y. Rearranging the equation for the diagonal across the side, we have:

y^2 = 20^2 - z^2

Now, substitute the expressions for x^2 and y^2 into the equation for the three-dimensional diagonal:

(25^2 - z^2) + (20^2 - z^2) + z^2 = 28^2

Simplifying the equation, we get:

625 - z^2 + 400 - z^2 + z^2 = 784

Combining like terms, we have:

1025 - z^2 = 784

Rearranging and solving for z^2, we get:

z^2 = 1025 - 784

z^2 = 241

Taking the square root of both sides, we find:

z = √241

Now that we have the value of z, we can substitute it back into the equations for x^2 and y^2 to solve for x and y respectively:

x^2 = 25^2 - (√241)^2
y^2 = 20^2 - (√241)^2

Calculating the square roots and simplifying, we find:

x ≈ 15.5 inches
y ≈ 23.3 inches

Therefore, the length of the diagonal across the top of the box is approximately 23.3 inches, which corresponds to option B.