Solution:
Let ABC be a triangle with BC=a, AC=b, AB=c and a<b<c. Denote by ma,mb,mc the lengths of medians drawn from the vertices A,B,C respectively. Using the formulas
4ma2=2(b2+c2)−a2,4mb2=2(a2+c2)−b2,4mc2=2(a2+b2)−c2
we obtain the relations
4ma2+4mb2+4mc2=3a2+3b2+3c2(4ma2)2+(4mb2)2+(4mc2)2=(2b2+2c2−a2)2+(2a2+2c2−b2)2+(2a2+2b2−c2)2=9a4+9b4+9c4=(3a2)2+(3b2)2+(3c2)2
We put A={4ma2,4mb2,4mc2} and B={3a2,3b2,3c2}. Let k≥1 be a positive integer. Let a=k+1, b=k+2 and c=k+3. Because
a+b=(k+1)+(k+2)=2k+3>k+3=c
a triangle with such side lengths exists. After simple calculations we have
A={3(k+1)2−2, 3(k+2)2+4, 3(k+3)2−2}B={3(k+1)2, 3(k+2)2, 3(k+3)2}
It is easy to prove that
x+y+z=m+n+p=3[(k+1)2+(k+2)2+(k+3)2]x2+y2+z2=m2+n2+p2=9[(k+1)4+(k+2)4+(k+3)4]
From the inequality 3(k+1)2−2>2003 we obtain k≥25. For k=25 we have an example of two sets
A={2026,2191,2350},B={2028,2187,2352}
with the desired properties.