Inspired from British Flag theorem I get this from inspired from British Flag theorem
British Flag theorem: Let $P$ be a point in the plane, let $ABCD$ be a rectangle in the plane then:
$$PA^2+PC^2=PB^2+PD^2$$
The theorem holds if P in Euclidean three-space Let $ABCD$ be a rectangle in a plane, Let $P$ be a point in the Euclidean three-space, then:
$$PA^2+PC^2=PB^2+PD^2$$
Define two directly similar cuboids: Let $ABCDEFGH$ and $A_1B_1C_1D_1E_1F_1G_1H_1$ be two directly similar cuboids if $ABCDEFGH$ and $A_1B_1C_1D_1E_1F_1G_1H_1$ are two cuboids and:
$$\frac{AB}{A_1B_1}=\frac{BC}{B_1C_1}=\frac{AE}{A_1E_1}$$ 
Example: Two cubes are two directly similar cuboids.
Inspiration from British Flag theorem: Let $ABCDEFGH$ and $A_1B_1C_1D_1E_1F_1G_1H_1$ be two directly similar cuboids in Euclidean three-space, then:
$$AA_1^2+CC_1^2+FF_1^2+HH_1^2=BB_1^2+DD_1^2+EE_1^2+GG_1^2$$

My question: The result is holds in Euclidean space ?


 A: The equality you state is indeed valid but under much more general hypotheses than you assume: it only requires $ABCDEFGH$ and $A_1 B_1 C_1 D_1 E_1 F_1 G_1 H_1$ to be parallelepipeds (not necessarily rectangular) and does not need any similarity assumption.  In fact, it is a trivial computation:
Choosing a basis, a parallelepiped can be defined by the eight vertices $A + M u$ where $A$ is one vertex of it and $M$ is a $3\times 3$ matrix (whose columns are the three edges starting from $A$) and $u$ ranges over the eight $\{0,1\}$-valued column vectors.  Let the vertices of the other parallelepiped be similarly written as $A' + M' u$ (I use primes rather than subscript ones for clarity).  Then the difference between both sides in the equality you consider is
$$
\sum_{u\in\{0,1\}^3} (-1)^{\#u}\, ((A + M u) - (A' + M' u))^2
$$
where $\#u := u_0+u_1+u_2$ stands for the sum of the coordinates of $u$ and the $(-1)^\bullet$ factor is there to represent your choice of alternating vertices (and of course $(\bullet)^2$ refers to the square norm, i.e., the dot product of the vector with itself).  Now expand the square completely.  Every term with no $u$ (like $\sum_u (-1)^{\#u}\, A^2$) vanishes because $\sum_u (-1)^{\#u}$ vanishes; every term linear in $u$ (like $\sum_u (-1)^{\#u}\, 2A\cdot(Mu)$) also vanishes because $\sum_u (-1)^{\#u}\,u$ vanishes.  Lastly, the quadradic terms $\sum_u (-1)^{\#u}\, (Mu)^2$ and $\sum_u (-1)^{\#u}\, (M'u)^2$ vanish because the term for each coordinate vanishes due to the equality
$$
-x_0^2-x_1^2-x_2^2 + (x_0+x_1)^2 + (x_1+x_2)^2 + (x_0+x_2)^2 - (x_0+x_1+x_2)^2 = 0
$$
and similarly the quadratic term $\sum_u (-1)^{\#u}\, 2(Mu)\cdot(M'u)$ vanishes because
$$
-x_0 x'_0 -x_1 x'_1 -x_2 x'_2 + (x_0+x_1)(x'_0+x'_1) + (x_1+x_2)(x'_1+x'_2) + (x_0+x_2)(x'_0+x'_2) - (x_0+x_1+x_2)(x'_0+x'_1+x'_2) = 0
$$
Both of these equalities are easy to check by symmetry and either can be deduced from the other.  Alternatively, the quadratic terms vanish because when $Q$ is a quadratic form, $Q(u_0,0,0) - Q(u_0,0,1) - Q(u_0,1,0) + Q(u_0,1,1)$ is a constant and does not depend on $u_0$ (so summing this times $(-1)^{u_0}$ makes it vanish).
