The altitude of one triangle is the median of the other.

squares and triangles
Let the squares have sides a and b and consider the altitude to triangle ABC in the diagram. Then by the sine rule
a
sinA
= b
sinB
.
The altitude to triangle ABC cuts the angle at the common vertex in the other triangle into two angles equal to angles A and B and the opposite side into lengths p and q where
p = b sinA
sinz
= a sinB
sinz
= a sinB
sin(p- z)
= q
showing that this is the median of the triangle.