Hi everyone. I've got a homework problem with Differential Calculus that drives me crazy for a couple of days so far and would like to ask you guys for a few suggestions

"Given two parabolas, (C1): y = x^2 and (C2): y = - (4-x)^2. Find two points, each point on one parabola so that the distance between them is smallest."

**What I got so far**: Well, I called the point on (C1) (x1, y1), the other point (x2, y2). After that, I set up the distance equation and replace both y(s) with their respective x(s) as follow:

After that I got stuck ... since I don't know how to differentiate an equation with two variables. Here I need to find the minimum of d, which is the distance between the two points.

I wonder if my approach to the problem is wrong or what. Any suggestion is highly appreciated. Thank you. (Also sorry if I confused you guys because I don't know how to type subscript and superscript in the forum yet)