Find the maximal value of $c^2 - ca + a^2 - \frac{(b + 1)^2(b - 2)}{c + a}$ in terms of $c^3 + a^3 = m$ where $a, b$ and $c$ are positives. 
Let $a, b$ and $c$ be positive real numbers such that $c^3 + a^3 = m$ and $$[(b^3 - abc) + ab(a + b) - c(a^2 + b^2)][(abc - b^3) - bc(b + c) + a(b^2 + c^2)] \le 0.$$ Find the maximal value of $$c^2 - ca + a^2 - \frac{(b + 1)^2(b - 2)}{c + a}$$ in terms of $m$.

We have that $$[(b^3 - abc) + ab(a + b) - c(a^2 + b^2)][(abc - b^3) - bc(b + c) + a(b^2 + c^2)] \le 0$$
$$\iff (b^3 - c^3)(a^3 - b^3) \ge 0 \implies b^3(c^3 + a^3 - b^3) \ge (ca)^3 \iff m - b^3 \ge \left(\frac{ca}{b}\right)^3$$
It is evident that $$c^2 - ca + a^2 - \frac{(b + 1)^2(b - 2)}{c + a} = \frac{m - b^3 + 3b + 2}{c + a} \ge \frac{(ca)^3 + 3b^4 + 2b^3}{b^3(c + a)}$$
How should I continue?
 A: 
Claim: The maximal value is $${\frak m}=\frac12\left(\frac m2\right)^{2/3}+\left(\frac m2\right)^{-1/3}+\frac32\tag1$$ attained at $a=b=c$.

Let $$d=c^2 - ca + a^2 - \dfrac{(b + 1)^2(b - 2)}{c + a}=\frac{m-b^3+3b+2}{a+c}\tag2$$ with $a^3+c^3=m$. Supposing that $$(b^3 - abc) + ab(a + b) - c(a^2 + b^2)=r\tag3$$$$(abc - b^3) - bc(b + c) + a(b^2 + c^2)=s\tag4$$ with $rs\le0$, subtracting $(3)$ from $(4)$ yields \begin{align}r-s&=-2(abc-b^3)+a^2b-ab^2-a^2c-b^2c+b^2c+bc^2-ab^2-ac^2\\&=2b^3+b(a-c)^2-ac(a+c)\tag5.\end{align} This forms the equality constraint for Lagrange multipliers; in particular, $${\cal L}(a,b,c,\lambda)=\frac{m-b^3+3b+2}{a+c}+\lambda(2b^3+b(a-c)^2-ac(a+c)-r+s)\tag6$$ with the partial derivatives $$\begin{bmatrix}\dfrac{\partial{\cal L}}{\partial a}\\\dfrac{\partial{\cal L}}{\partial b}\\\dfrac{\partial{\cal L}}{\partial c}\end{bmatrix}=\begin{bmatrix}-\dfrac{m-b^3+3b+2}{(a+c)^2}+\lambda(2b(a-c)-c(2a+c))\\\dfrac{-3b^2+3}{a+c}+\lambda(6b^2+(a-c)^2)\\-\dfrac{m-b^3+3b+2}{(a+c)^2}+\lambda(-2b(a-c)-a(a+2c))\end{bmatrix}\tag7$$ which give, respectively, $$m+b^3-3b-2+\lambda(a+c)^2(2ab-2ac-2bc-c^2)=0\tag8$$$$-3b^2+3+\lambda(a+c)(6b^2+(a-c)^2)=0\tag9$$$$m+b^3-3b-2+\lambda(a+c)^2(-2ab-2ac+2bc-a^2)=0\tag{10}.$$ Subtracting $(8)$ from $(10)$ yields $$\lambda(a+c)^2(4ab-4bc+a^2-c^2)=\lambda(a+c)^2(a-c)(4b+a+c)=0\tag{11}$$ and since $a,b,c>0$, either $\lambda=0$ or $a=c$. If the former, $(8)$ implies that $m+b^3-3b-2=0$, so $d=0$. This is clearly not maximal as $a=b=c=1$ yields $d=3>0$. Therefore $$a=c\implies a^3+a^3=m\implies a^3=\frac m2.\tag{12}$$ Replacing $c$ by $a$ in $(3)$ and $(4)$ gives $$r=b^3-a^2b+a^2b+ab^2-a^3-ab^2=b^3-a^3\tag{13}$$$$s=a^2b-b^3-a^2b-ab^2+ab^2+a^3=a^3-b^3\tag{12}$$ so that $$(b^3-a^3)(a^3-b^3)=-(b^3-a^3)^2\le0\tag{14}.$$ This forces equality to hold at $a=b$, and together with $(12)$, the maximal value is $${\frak m}=\frac{m-a^3+3a+2}{a+a}=\frac{m-\frac m2+3\left(\frac m2\right)^{1/3}+2}{2\left(\frac m2\right)^{1/3}}\tag{15}$$ which proves $(1)$ and hence the claim.
A: Constraint
$$((b^3 - abc) + ab(a + b) - c(a^2 + b^2))((abc - b^3) - bc(b + c) + a(b^2 + c^2)) \le 0,$$
or
$$(b^3-a^3)(b^3 - c^3)\ge 0,$$
is equivalent to
$$b^2-(a+c)b+ac\ge 0\tag1.$$
The goal function 
$$f(a,b,c)=c^2 - ca + a^2 - \frac{(b + 1)^2(b - 2)}{c + a}$$
under the conditions 
$$a^3 + c^3 = m\tag2$$
 can be presented in the form of
$$f(a,b,c)=\dfrac1m(c^2-ca+a^2)(m-(b^3-3b-2)).\tag3$$
$\color{brown}{\textbf{At the edges}}.$
$$\max f(0,b,c) = \max f(a,b,0)
= \begin{cases}
\dfrac{m+4}{\sqrt[3]m},\quad\text{if}\quad m\in(0,1]\\
\dfrac{3\sqrt[3]m+2}{\sqrt[3]m},\quad\text{if}\quad m\in\left(1,3\sqrt3\right]\\
\dfrac{m+2}{\sqrt[3]m},\quad\text{if}\quad m\in\left(3\sqrt3,\infty\right).
\end{cases}\tag4$$

The greatest value of 
$$g(a,c)=c^2-ca+a^2$$
 under the condition $(2)$ can be achieved at the edges of the area or in the inner stationary points.
At the edges,
$$g_e = g\left(0,\sqrt[3]{m}\right) = g\left(0,\sqrt[3]{m}\right) = \sqrt[3]{m^2}.\tag5$$
The inner stationary points
of $g(a,c)$ under the condition $(2),$ in accordance with Lagrange multupliers method,  corresponds with the stationary points of
$$G(a,c,\lambda) = a^2-ac+c^2+\lambda(m-a^3-c^3),$$
which can be found from the system $G'_a = G'_c = G'(\lambda) = 0,$  or
$$
\begin{cases}
2a-c-3\lambda a^2=0\\
-a+2c-3\lambda c^2 = 0\\
a^3+c^3=m
\end{cases}\ \Rightarrow
\begin{cases}
(2a-c)c^2=(-a+2c)a^2\\
a^3+c^3=m
\end{cases}\ \Rightarrow
\begin{cases}
(a-c)(a^2-ac+c^2)=0\\
a^3+c^3=m,
\end{cases}
$$
with the solution
$$g_s=g\left(\sqrt[3]{\dfrac  m2},\sqrt[3]{\dfrac  m2}\right)=\sqrt[3]{\dfrac {m^2}4}.\tag6$$
The global maximum is
$$\max f(a,0,c)=\dfrac{m+2}{\sqrt[3]m}\max(g_e,g_s) = \dfrac{m+2}{\sqrt m}\ \text{ at }\ 
\dbinom ac\in\left\{\dbinom{\sqrt[3]m}0,\dbinom0{\sqrt[3]m}\right\}.\tag6$$
$\color{brown}{\textbf{The inner stationary points}}$
of $f(a,b,c)$ under the conditions $(1),(2),$ in accordance with Lagrange multupliers method,  corresponds with the stationary points of
$$F(a,b,c,\lambda,\mu) = (c^2-ca+a^2)(m-a^3+3a+2)+\lambda(m-a^3-c^3)+\mu(b^2-(a+c)b+ac),$$
which can be found from the system 
$$F'_a = F'_b = F'_c = F'(\lambda) = F'_{\mu} = 0,$$
 and can be solved similarly.
If the inner maxima are less than on the edges then $(4)$ defines the the global maxima.
