From Spivak (Foundations)(2nd edition) I just finished high school and started reading Spivak's calculus. I've noticed that "this kind of mathematics" is kind of different and more severe from what I've been taught in high school.

Which conditions should $f$, $g$, $h$, and $k$ satisfy so that $f(x)g(y)=h(x)k(y)$ for every $x$ and $y$?

Some hint would be useful. I've found when the equation holds, but then, when I saw the solution, I didn't understand it very well.
 A: I don't know the solution in Spivak and haven't solved the problem. Since your comment asks for how one might approach the problem, here's where I'd begin: assuming things are never $0$ (a possibility I'd postpone addressing) I'd write
$$
\frac{f(x)}{h(x)} = \frac{k(y)}{g(y)} .
$$
to separate $x$ and $y$.
Then both sides of that equation must be the same constant. How far does that get you?
A: I assume that $f, g, h, k:\mathbb{R}\to \mathbb{R}$, although it is unclear from Spivak's text whether this is meant.
First, if there exists $x_0$ such that neither $f(x_0)$ nor $h(x_0)$ is zero, then 
$\frac{f(x_0)}{h(x_0)}=\frac{k(y)}{g(y)} $ for all y such that neither $k(y)$ nor $g(y)$ is zero (obviously, either both functions of y are zero or neither is zero). Letting $\frac{f(x_0)}{h(x_0)}=c$, we have $k(y)=c\times g(y)$. We immediately have $f(x)=c \times h(x)$, for all $x$ such that neither $f(x)$ nor $h(x)$ is zero. 
If $f(x)$ is constant and zero, then either $h(x)$ is constant and zero or $k(y)$ is constant and zero.
I will leave you to tidy up the final answer.
A: Choose arbitrary $x$ and $y$, then one solution is either $f(x)=h(x)=0$ or $g(y)=k(y)=0$. Then the other two function values are arbitrary.
If not, then WLOG, let $f(x) \ne 0$, we have
$$g(y)=\frac{h(x)}{f(x)}k(y)$$
Now if $k(y)=0$, then $g(y)=0$, which reduces to the first case, so assume $k(y) \ne 0$, then 
$$\frac{h(x)}{f(x)}=\frac{g(y)}{k(y)}$$
Fixing $x$ in the above argument, the above equation is true for all $y$ where $k(y) \ne 0$, and hence
$$\frac{g(y)}{k(y)}=\text{Constant}$$
Similarly, repeating the argument with $x,y$ switched, we can argue that
$$\frac{h(x)}{f(x)}=\text{Constant}$$
Since
$$\frac{h(x)}{f(x)}=\frac{g(y)}{k(y)}$$
the two constants should be the same.
In conclusion, the answer is
(1) $f(x)=h(x)=0$ or $g(y)=k(y)=0$
(2) $h(x)=Cf(x), g(y)=Ck(y)$ where $C\ne 0$.
A: The subtly lies with the value $0$. Suppose that either 
$1.$ One of $g,f$ is the zero function. 
and
$2$. One of $h$, $k$ is the zero function.
Then the equation clearly holds. 
Now, if the above two conditions do not hold, then there is some pair $(x,y)$ we can plug in so that one of the sides is non-zero which implies that none of the functions on either side are the zero function. 
As this has been established, fix $y$ such that one of $g(y),k(y)$ is non-zero . It's easy to see now that for this fixed $y$, neither $g$ nor $k$ can be $0$ (this follows from the fact that the two functions of $x$ are sometimes non-zero, so as $x$ varies one side of the equation will take non-zero values) and we thus conclude that $h(x) = c_1 \cdot f(x)$. 
Fix $x$ in an analogous manner and conclude $g(y) = c_1 \cdot k(y)$. To show that the constants are equal, note that our "fixing" of the constants, as discussed in the second paragraph, is such that we don't have to worry about division by zero. Then it's straightforward division. 
