I found this problem in a section of an old notebook, where I used to write down weird problems I came across and that I didn't know how to solve. Long story short, I rediscovered this notebook a week ago and managed to solve most geometry problems, with the exception of the following.
Let $n\ge 4$, and let $A_1, A_2,\dotsc, A_n$ be concyclic. Let $h$ be the set of the orthocenters of the triangles determined by these points, and let us label its elements (the orthocenters) as $H_1, H_2, \dotsc$
Show that: $$\sum_{H_a,H_b∈h} H_aH_b ≥\frac{(n-2)(n-3)}{2} \sum_{1\leq i,j\leq n} A_iA_j,$$ and determine when equality takes place.
Note: $H_aH_b$ and $A_iA_j$ are the length of the segments.
I am completely stumped by this problem.