First off i have a problem that the teacher somewhat worked out on the board.

I am not sure how he got the answer.

Find the vector function that represents the curve of intersection of the two surfaces.

The cylinder.

and the surface

Attempt:

Now, from here i think the teacher used the product rule? I am not sure.

Solving for z

I tried the product rule but couldnt get it. Could someone work out the steps on how he got the answer?

Thank you