In a triangle ABC, if certain areas are equal then P is its centroid Let $P$ be a point in the interior of $\triangle ABC$. Extend $AP$, $BP$, and $CP$ to meet $BC$, $AC$, and $AB$ at
$D$, $E$, and $F$, respectively. If $\triangle APF$, $\triangle BPD$, and $\triangle CPE$, have equal areas, prove that $P$ is the centroid of
$\triangle ABC$.
I am trying to do with Ceva's theorem: $\frac{AF}{FB}\cdot\frac{BD}{DC}\cdot\frac{CE}{EA}=1$ and also with the result $\frac{AP}{PD}=\frac{AF}{FB}+\frac{AE}{EC}$ but having some difficulties. Please give any hint.

I will use barycentric coordinates, an excellent reference is
Barycentric Coordinates for the Impatient, Max Schindler, Evan Chen
and it is by chance compact, and easily accesible/readable. We will use the formula in Theorem 10 in it.
Let $P$ be $P=(x,y,z)$ in barycentric coordinates w.r.t. $\Delta ABC$, $x,y,z >0$, $x+y+z=1$.
We may and do assume that the area of the given triangle is normed to $[ABC]=1$.
Then the area $[AFP]$ of $\Delta AFP$ is computed using
$$
\begin{aligned}
A &= (1,0,0)\ ,\\
P &= (x,y,z)\ , \\
F &= [x:y:0]=\left(\frac x{x+y},\frac y{x+y},0\right)\ ,\text{ so}\\
[AFP]
&=
\begin{vmatrix}
1 & 0 & 0\\
\frac x{x+y} &\frac y{x+y} & 0\\
x & y & z
\end{vmatrix}
=
\frac 1{x+y}
\begin{vmatrix}
1 & 0 & 0\\
x & y & 0\\
x & y & z
\end{vmatrix}
=
\frac {yz}{x+y}
=
\frac {xyz}{x(x+y)}
\ .
\end{aligned}
$$
The other two areas are obtained by cyclic permutation of the letters $x,y,z$ (taken in this order).
Then the given equality of areas becomes:
$$
\frac {xyz}{x(x+y)} =
\frac {xyz}{y(y+z)} =
\frac {xyz}{z(z+x)} \ .
$$
So $x(x+y)=y(y+z)=z(z+x)$. Let $s$ be the common value of this expression, and let us obtain some further relation, here with all details...
$$
\begin{aligned}
s &= x(x+y) = x(1-z) = x - xz\ ,\\
s &= y(y+z) = y(1-x) = y - yx\ ,\\
s &= z(z+x) = z(1-y) = z - zy\ ,\\[2mm]
3s &= 1 - (xy+yz+zx)\ ,\\
 s &= ys + zs + xs = y(x-xz)+z(y-yx) +x(z-zy)\\
   &= (xy+yz+zx) -3xyz\ ,\\[2mm]
s(1-3s) &= s(yz+zx+xy) =\sum yz(x-xz)= 3xyz - xyz = 2xyz\ ,\\
3s(1-3s) &= 6xyz = 2(xy+yz+zx) - 2s = 2(1-3s)-2s\ ,
\end{aligned}
$$
and we obtain an equation of degree two in $s$, which is
$$
0 = (2-3s)(1-3s) - 2s =2-11s + 9s^2=(1-s)(2-9s)\ .
$$
Since $s=x(x+y)<1$, we only accept $s=2/9$. The simple elementary polynomials in $x,y,z$ are
$$
\begin{aligned}
e_1 &=x+y+z=1\ ,\\ 
e_2 &=xy+yz+zx=1-3s=\frac 13\ ,\\
e_3 &=xyz=\frac 12s(1-3s)=\frac 1{27}\ ,
\end{aligned}
$$
so $x,y,z$ are (Vieta) the roots of the polynomial in $T$
$$
T^3 - T^2+\frac 13T -\frac 1{27}=\left(T-\frac 13\right)^3\ ,
$$
so the point $P$ is $P=(x,y,z)=\left(\frac 13,\frac 13,\frac 13\right)=[1:1:1]$,
the centroid.
