<s>[INST] Where the object that moves along the intersection of $x^2+y^2=1$ and $y+z=1$ needs to be if we want the sum $x+2y+z$ to be max/min? 
An object is moving along the curve which is derived from the intersection of the cylinder $x^2+y^2=1$ and the plane $y+z=1$. Where does the object need to be located if we want to maximize/minimize the sum $x+2y+z$? What is the min/max sum?

I'm really not sure how to determine the constraint function. The intersection of the cylinder and the plane is:
$$
x^2+(1-z)^2=1
$$
Then:
$$
z=\frac{x^2+z^2}{2}
$$
I guess we can define new function:
$$
g(x,y)=x+2y+z=x+2y+\frac{x^2+z^2}{2}=x+2y+\frac{x^2+(1-y)^2}{2}
$$
Then we can look for critical points:
$$
g_x=1+x\\
g_y=1+y
$$
Which means that $(-1,-1)$ is the critical point. I don't see how to proceed though.
 [/INST] 
An object is moving along the curve which is derived from the intersection of the cylinder $x^2+y^2=1$ and the plane $y+z=1$. Where does the object need to be located if we want to maximize/minimize the sum $x+2y+z$? What is the min/max sum?

So you're looking for the extreme values of $f(x,y,z) = x+2y+z$ for points $(x,y,z)$ located on the cylinder $\color{blue}{x^2+y^2=1}$ and on the plane $\color{red}{y+z=1}$; i.e. on their intersection. Introduce two Lagrange multipliers to limit the points to those on this intersection:
$$\begin{align}F(x,y,z,\lambda,\mu) & = f(x,y,z)+\lambda \left( \color{blue}{x^2+y^2 -1} \right)+\mu \left( \color{red}{y+z -1} \right) \\
& = x+2y+z+\lambda \left( \color{blue}{x^2+y^2 -1} \right)+\mu \left( \color{red}{y+z -1} \right)\end{align}$$ 
Now you solve the system:
$$\left\{ \begin{array}{rcl}
F_x = 0 \\
F_y = 0 \\
F_z = 0 \\
F_\lambda = 0 \\
F_\mu = 0
\end{array}\right. \iff \left\{ \begin{array}{rcl}
F_x = 0 \\
F_y = 0 \\
F_z = 0 \\
\color{blue}{x^2+y^2=1} \\
\color{red}{y+z=1}
\end{array}\right. \iff \ldots$$
Can you proceed?

Addition after comments. In your notation with
$$\color{green}{p(x,y,z)=x+2y+z \implies \nabla p = \langle 1,2,1\rangle }$$
the function to be optimized and constraints
$$\color{blue}{j(x,y,z)=x^2+y^2-1 \implies \nabla j = \langle 2x,2y,0 \rangle}$$
and
$$\color{red}{k(x,y,z)=y+z-1 \implies \nabla k = \langle 0,1,1 \rangle}$$
the system becomes:
$$\left\{ \begin{array}{l}
\color{green}{\nabla p} = \lambda \color{blue}{\nabla j} + \mu \color{red}{\nabla k} \\
\color{blue}{j(x,y,z)=0} \\
\color{red}{k(x,y,z)=0}
\end{array}\right. \iff
\left\{ \begin{array}{l}
1=2\lambda x \\
2 = 2\lambda y + \mu \\
1 = \mu \\
\color{blue}{x^2+y^2=1} \\
\color{red}{y+z=1}
\end{array}\right.$$
</s>