Let $f: \mathbb{R}^{2} \to \mathbb{R}^{+}$such that for every rectangle $A B C D$ one has
$$
f(A)+f(C)=f(B)+f(D).
$$
Let $K L M N$ be a quadrangle in the plane such that $f(K)+f(M)=f(L)+f(N)$, for each such function. Prove that $K L M N$ is a rectangle.
Proposed by Navid.
This is a nice problem, but perhaps on the easy side for a P2.
The key insight for this problem is the British Flag Theorem: For any rectangle $ABCD$ and point $P$ in the plane, we have \[ PA^2+PC^2 = PB^2+PD^2. \]In particular, for any fixed point $P$, the function $f(A) = PA^2+1$ is a valid function (the +1 is required since the codomain is $\mathbb{R}^+$). Fix a set of Cartesian coordinates. Let $K=(x_K,y_K)$ and define the coordinates of $L,M,N$ similarly.
Setting $P=(0,0),(1,0),(0,1)$ gives
\begin{align}
x_K^2+y_K^2+x_M^2+y_M^2 &= x_L^2+y_L^2+x_N^2+y_N^2 \\
(x_K-1)^2+y_K^2+(x_M-1)^2+y_M^2 &= (x_L-1)^2+y_L^2+(x_N-1)^2+y_N^2 \\
x_K^2+(y_K-1)^2+x_M^2+(y_M-1)^2 &= x_L^2+(y_L-1)^2+x_N^2+(y_N-1)^2
\end{align}respectively. Now $(1)-(2)$ gives $x_K+x_M=x_L+x_N$, and $(1)-(3)$ gives $y_K+y_M=y_L+y_N$, so the segments $KM$ and $LN$ have a common midpoint $O$. Setting $P=O$ gives $OK=OL$, so $KLMN$ is a rectangle. $\Box$