Diagonal of a cube problem

Question

Hints

Answer