Homotopy equivalence of $S^{p-1}$ and $X$ given by $x_1^2 + \cdots + x_p^2 - x_{p+1}^2 - \cdots - x_n^2 = 1$, in $\mathbb{R}^n$ Let $X$ be the subspace of $\mathbb{R}^n$ given by $$x_1^2 + \cdots + x_p^2 - x_{p+1}^2 - \cdots - x_n^2 = 1$$
I have to show that $X$ is homotopy equivalent to $S^{p-1}$.
Now, one is the obvious map, that is the inclusion map $$i: S^{p-1} \hookrightarrow X$$
I'm unable to think of an $f: X \rightarrow S^{p-1}$ that would work. I have a hint that says I should think of increasing $x_1, \cdots,x_p$ while decreasing $x_{p+1},\cdots,x_n$ and keeping $x_1^2 + \cdots + x_p^2 - x_{p+1}^2 - \cdots - x_n^2 = 1$ fixed. But I'm not sure what that means

I've been thinking about it more and more, and thought I should look how this works in $n=2$. So $X$ is nothing but the space given by the hyperbola $x^2 - y^2 = 1$
And now, I have to show that $X$ is homotopic to $S^0=\{(1,0),(-1,0)\}$
So, we're looking for a map $f:X \rightarrow \{(1,0),(-1,0)\}$. So, in $X$ we have basically 2 strands, one passing through $(1,0)$ and the other through $(-1,0)$. If I just project them on the points they pass through we will have the map $f(x,y)= \begin{cases}(1,0) & x>0 \\ (-1,0) & x<0 \end{cases}$
And, we had the inclusion map $i: S^0 \hookrightarrow X$
So, $f \circ i = \text{id}_{S^0}$; and $i \circ f = f$
Hence, we need to see if $f$ is homotopic to $\text{id}_{X}$.  So, let's look at $H(x,t)=tx + (1-t)f$, which gives us what we need. 
Are my arguments correct, and how do I generalise them? 
 A: Here's cjackal's hint with a little more detail:
A point on this surface has the form $({\bf x}, {\bf z})$, where
${\bf x} = (x_1, \dots, x_p)$ and ${\bf z} = (x_{p+1}, \dots, x_n)$.
You want to define a deformation retract $\Sigma \times [0,1] \to \Sigma$ onto 
$\Sigma \cap \{x_1^2 + \cdots + x_p^2 = 1\} \cong S^{p-1}$, where $\Sigma = \{x_1^2 + \cdots + x_p^2 - (x_{p+1}^2 + \cdots + x_n^2) = 1\}$.
We'd like to move $({\bf x}, {\bf z})$ to $({\bf x}/ \|{\bf x}\|, 0)$ as $t$ varies from $0$ to $1$.  
The standard way to do this for ${\bf z}$ is to use the map ${\bf z} \mapsto (1-t) \, {\bf z}$.  
It's not clear what the formula should be for ${\bf x}$, but, using the cases of $p=1$ and $p=2$ for intuition, we can see that a map of the form ${\bf x} \mapsto \lambda(t) \, {\bf x}$, i.e. $\lambda(t)$ is a scalar valued function, should work.  What should $\lambda(t)$ be?  
Well, use the equation that defines $\Sigma$ to put a condition on $(\lambda(t) \, {\bf x}, (1-t) \, {\bf z})$.  And use the fact that $({\bf x}, {\bf z})$ satisfies this same equation.  Solve for $\lambda(t)$.  
You might try the cases of $p=1$ and $p=2$ to convince yourself that this defines a continuous function $\lambda(t)$ in terms of the coordinates $x_1, \dots, x_n$.
A: Thanks to cjackal and Robert Ball I finally figured out, I thought it would be appropriate to post an answer. 

We first let $\mathbf{x}=(x_1, \cdots, x_p)$, $\mathbf{y}=(x_{p+1}, \cdots,x_n)$, and $P(\mathbf{x,y}):\left\lVert\mathbf{x}\right\rVert^2 - \left\lVert\mathbf{y}\right\rVert^2$
Therefore, we have $X=\{(\mathbf{x,y}) \ \vert \ P(\mathbf{x,y})=1\}$
Now, we have our usual inclusion map $i: S^{p-1} \hookrightarrow X$. And we define $$f: X \rightarrow S^{p-1} \\(\mathbf{x,y}) \mapsto \left(\mathbf{\frac{x}{\left\lVert\mathbf{x}\right\rVert},0}\right)$$
We note that $f \circ i = \text{id}_{S^{p-1}}$, and that $i \circ f = f$. Therefore, we now want a deformation retract 
$$H: X \times [0,1] \rightarrow X$$ $$H((\mathbf{x,y}),t) = (1-t) \cdot \text{id}_{X}(\mathbf{x,y}) + \lambda(t) \cdot f(\mathbf{x,y}) = \left(\left(1-t + \frac{\lambda(t)}{\left\lVert\mathbf{x}\right\rVert}\right)\mathbf{x},(1-t)\mathbf{y}\right) \in X$$
Therefore, we want 
$$1=\left(1-t + \frac{\lambda(t)}{\left\lVert\mathbf{x}\right\rVert}\right)^2\left\lVert\mathbf{x}\right\rVert^2 - (1-t)^2\left\lVert\mathbf{y}\right\rVert^2 \\ = \left((1-t)^2 + \frac{\lambda(t)^2}{\left\lVert\mathbf{x}\right\rVert^2} + \frac{2\lambda(t)(1-t)}{\left\lVert\mathbf{x}\right\rVert}\right)\left\lVert\mathbf{x}\right\rVert^2 -(1-t)^2(\left\lVert\mathbf{x}\right\rVert^2 - 1)$$ 
$$= \lambda(t)^2 + 2\lambda(t)(1-t)\left\lVert\mathbf{x}\right\rVert + (1-t)^2 \\ \implies \lambda(t)^2 + 2\lambda(t)(1-t)\left\lVert\mathbf{x}\right\rVert + t(t-2) = 0$$
Hence, taking $$\lambda(t) = - (1-t)\left\lVert\mathbf{x}\right\rVert + \sqrt{(1-t)^2\left\lVert\mathbf{x}\right\rVert^2 - t(t-2)}$$
we get
$$H((\mathbf{x,y}),1)=\lambda(1) \cdot f = f,\ \ \ \ \  H((\mathbf{x,y}),0) = \text{id}_{X} + \lambda(0) \cdot f = \text{id}_{X}$$
which gives us $f \sim \text{id}_{X}$. Hence $X$ is homotopy equivalent to $S^{p-1}$.
The deformation retract we obtained is moreover a strong deformation retract, since on $S^{p-1}$ we get $\lambda(t)=t$ and therefore $H((\mathbf{x,0}),t) = (\mathbf{x,0})$, $\forall t \in [0,1]$
