I have density functions $f_{X,Y}(x,y)=f_X(x)f_Y(y)$ and $g_{X,Y}(x,y)=g_X(x)g_Y(y)$. I am supposed to show that I must have $KL(f_{X,Y} || g_{X,Y})=KL(f_{X} || g_{X})+KL(f_{Y} || g_{Y})$.
I don't not know how to start. I imagine I must plug parts of it in the Kullback-Leibler divergence formula which uses Integrals.
From the definition of the KL divergence (let me use $D$ instead of $KL$) we have
$D(f_{X,Y} || g_{X,Y}) = \int_{-\infty}^\infty\int_{-\infty}^\infty f_{X,Y} \log \left(\frac{f_{X,Y}}{g_{X,Y}}\right) dx dy $.
Substituting in your expressions for the joint PDFs gives:
$D(f_{X,Y} || g_{X,Y}) = \int_{-\infty}^\infty\int_{-\infty}^\infty f_{X}(x) f_Y(y) \log \left(\frac{f_{X}(x) f_Y(y)}{g_{X}(x)g_Y(y)}\right) dx dy $.
The logarithm can be separated since $\log(ab) = \log a + \log b$ to give
$D(f_{X,Y} || g_{X,Y}) = \int_{-\infty}^\infty\int_{-\infty}^\infty f_{X}(x) f_Y(y) \left[ \log \left(\frac{f_{X}(x)}{g_{X}(x)}\right) + \log \left(\frac{f_{Y}(y)}{g_{Y}(y)} \right)\right] dx dy $.
Collecting terms gives
$D(f_{X,Y} || g_{X,Y}) = \int_{-\infty}^\infty f_{X}(x) \log \left(\frac{f_{X}(x)}{g_{X}(x)} \right) dx \int_{-\infty}^\infty f_Y(y) dy + \int_{-\infty}^\infty f_X(x) dx\int_{-\infty}^\infty f_{Y}(y) \log \left(\frac{f_{Y}(y)}{g_{Y}(y)} \right) dy .$
Because $\int f_X(x) dx = \int f_Y(y) dy = 1$ since they are PDFs we thus finally have
$D(f_{X,Y} || g_{X,Y}) = D(f_X || g_X) + D(f_Y || g_Y)$
as required.