Show that the level surfaces $f(x,y,z)=0$ and $g(x,y,z)=0$ are perpendicular at a point p where $∇f(p)≠ 0$ and $∇g(p)≠ 0$ if and only if $(\frac{∂f}{∂x})(\frac{∂g}{∂x})+(\frac{∂f}{∂y})(\frac{∂g}{∂y})+(\frac{∂f}{∂z})(\frac{∂g}{∂z})=0$ at $p$.
Show that the surfaces $z^2=x^2+y^2$ and $x^2+y^2+z^2=a^2$ (with $a$ constant) are perpendicular at every point of intersection.
What I have tried
since $∇f(p)≠ 0$ and $∇g(p)≠ 0$ then
$N_g=(\frac{∂g}{∂x},\frac{∂g}{∂y},\frac{∂g}{∂z})$ and $N_f=(\frac{∂f}{∂x},\frac{∂f}{∂y},\frac{∂f}{∂z})$ (both at $p$)
So, for the surfaces to be perpendicular, the normal lines need to be perpendicular, hence,
(at $p$) $0=Ng\cdot Nf=(\frac{∂g}{∂x},\frac{∂g}{∂y},\frac{∂g}{∂z}).(\frac{∂f}{∂x},\frac{∂f}{∂y},\frac{∂f}{∂z})=(\frac{∂f}{∂x})(\frac{∂g}{∂x})+(\frac{∂f}{∂y})(\frac{∂g}{∂y})+(\frac{∂f}{∂z})(\frac{∂g}{∂z})$ as required. This seems like I am on the right lines, however I am a bit uneasy about the point at $p$.
Part 2 For the second part I tried to find the normal lines and do the dot product with them both but it did not work out to be zero. For $z^2=x^2+y^2$, I solved for $z$ and used the formula for a graph $(−∂z/∂x,∂z/∂y,1)$ and got $\left(\frac{−x}{\sqrt{(x^2+y^2)}},\frac{−y}{\sqrt{(x^2+y^2)}},1\right)$ and $\left(\frac{x}{\sqrt{(a^2−x^2−y^2)}},\frac{y}{\sqrt{(a^2−x^2−y^2)}},1\right)$ for $x^2+y^2+z^2=a^2$. Dot product of these two don't yield zero, this is where I get stuck.
Answer to part $1$ is correct.
Since the point $p$ lies on both surfaces $z^2=x^2+y^2$ and $x^2+y^2+z^2=a^2$, the dot product$$\begin{align*}&\left(\frac{−x}{\sqrt{x^2+y^2}},\frac{−y}{\sqrt{x^2+y^2}},1\right)\cdot\left(\frac{x}{\sqrt{a^2−x^2−y^2}},\frac{y}{\sqrt{a^2−x^2−y^2}},1\right)\\&=\left(-\frac x{|z|},-\frac y{|z|},1\right)\cdot\left(\frac x{|z|},\frac y{|z|},1\right)\\&=\frac{z^2-x^2-y^2}{z^2}\\&=0.\end{align*}$$Note that you could have also used the previous result by taking the surfaces to be the level curves $f(x,y,z)=z^2-x^2-y^2=0$ and $g(x,y,z)=x^2+y^2+z^2-a^2=0$ and using the result directly.