What is the maximum and minimum value of this function? Find the maximum and minimum values of the $f(z) = \vert 1 + z\vert  + \vert 1-z+z^2\vert$ on the $\{z\in \mathbb{C} \vert$ $\vert z \vert =1, Re(z) \geq 0\}$ (Here the $\mathbb{C}$ is the set of
complex numbers.)
Let me show you my solution.
Put $z = e^{i\theta}$ with $cos\theta \geq 0$ (I.e. $0 \leq \theta \leq {\pi \over2}$ or  ${3\pi \over2}  \leq \theta \leq 2\pi$ )
Since $\vert 1+z \vert = 2\vert \cos({\theta \over 2})\vert $ and $\vert 1-z+z^2 \vert =\vert \frac{z^3+1}{z+1}\vert = \vert 4cos^2(\frac{\theta}{2})-3\vert$
$f(z)$ would be  $ f(\theta) = 2\vert \cos({\theta \over 2})\vert +\vert 4cos^2(\frac{\theta}{2})-3\vert$
Firstly , I put the $u = \cos({\theta \over 2})$. And now the range of the $\frac{1}{\sqrt2} \leq u \leq 1 $ or $ -1\leq u \leq \frac{-1}{\sqrt2} $ from the $cos^2\frac{\theta}{2} = \frac{1+cos\theta}{2} \geq \frac{1}{2}$
Second, only just we find the either max or min of the $f(u)=2\vert u \vert + \vert 4u^2 -3 \vert$ over the $\frac{1}{\sqrt2} \leq u \leq 1 $ or $ -1\leq u \leq \frac{-1}{\sqrt2} $.
Third, I divided the possible cases.
$(1)$ $u \leq 0, 4u^2-3 \leq0 $ ; Find the value of the $f(u)=-4u^2+3-2u$ on the $ \frac{-\sqrt3}{2} \leq u \leq \frac{-1}{\sqrt 2} $ ; The min and max are $\sqrt 3 ,3$
$(2)$ $u \leq0, 4u^2-3 \geq0 $ ; Find the value of the $f(u)=4u^2-3-2u$ over the $ -1\leq u \leq \frac{-\sqrt3}{2} ; $ The min and max are $\sqrt 3 ,3$
$(3)$ $u \geq 0, 4u^2-3 \leq0 $ ; Find the value of the $f(u)=-4u^2+3+2u$ over the $ \frac{1}{\sqrt 2} \leq u \leq  \frac{\sqrt3}{2} $ ; The min and max are $ \sqrt3, 1+\sqrt 2$
$(4)$ $u \geq 0, 4u^2-3 \geq0 $ ; Find the value of the $f(u)=4u^2-3+2u$ over the $ \frac{\sqrt3}{2} \leq u \leq 1 $ ; The min and max are $\sqrt3 ,3$
So my answer is $\sqrt3$ and $3$
But In my Teaching assistance's note the answer was $\frac{13}{4}, \sqrt3$. I can't understand why the answer like those. Are my processes right? Which one is right between him and mine?  Plus, Would you tell me the error and its reason if my answer is not correct.

For your given function, your answer is correct.  The maximum is attained when $\theta = 0$, giving $z = 1$, hence $$f(1) = |1+1| + |1^2-1+1| = 3.$$  This is clearly greater than $\sqrt{3}$ claimed by the note.  The minimum is attained when $\theta \in \pm \pi/3$, giving $z \in \frac{1}{2} \pm \frac{\sqrt{3}}{2} i$, hence $$f(e^{i \pi/3}) = |1 + e^{i \pi /3}| + |e^{2\pi i/3} - e^{i \pi/3} + 1| = \sqrt{3}.$$  The claimed answer $13/4$ doesn't even make sense because it is larger than $3$.
In terms of $\theta$, the function $f$ is equivalent to
$$g(\theta) = 2 \cos \frac{\theta}{2} + |1 - 2 \cos \theta| = \begin{cases}
2 \cos \frac{\theta}{2} - 1 + 2 \cos \theta, & 0 \le |\theta| \le \pi/3 \\
2 \cos \frac{\theta}{2} + 1 - 2 \cos \theta, & \pi/3 < |\theta| \le \pi/2. \end{cases}$$  Since $g$ is an even function we may consider just the two cases $0 \le \theta \le \pi/3$ and $\pi/3 < \theta \le \pi/2$, and the rest of the analysis is straightforward as you have already done.
