You need to use polynomial long division (try googling "polynomial long division") to divide $x^3+3x^2-x-2$ by $(x+3)(x+5)= x^2+8x+15$.
This is done by dividing leading terms, multiplying the resulting quotient by $x^2+8x+15$, subtracting this result from $x^3+3x^2-x-2$, and repeating...
The first step: the leading terms are $x^3$ and $x^2$. So $x^3/x^2 = x$. Now $x(x^2+8x+15) = x^3+8x^2+15x$. Subtracting this from $x^3+3x^2-x-2$, we get $-5x^2-16x-2$ (a remainder so far).
Now start over with $-5x^2-16x-2$ and $x^2+8x+15$. Dividing leading terms: $-5x^2/x^2 = -5$. Then $-5(x^2+8x+15) = -5x^2-40x-75$. Subtract this from $-5x^2-16x-2$ and get $24x+73$ (our remainder).
We cannot continue division any more since $24x+73$ has a lower degree than $x^2+8x+15$.
Therefore, $x^3+3x^2-x-2$ divided by $x^2+8x+15$ is $x-5$ (the terms we found along the way: $x$ and $-5$) with a remainder of $24x+73$.
Or we can use technology: Wolfram Alpha
Another way to find the remainder is to use the fact that it must be linear (at least one degree lower than $x^2+8x+15=(x+3)(x+5)$. So division should result in $x^3+3x^2-x-2 = q(x)(x+3)(x+5) + (ax+b)$ where $q(x)$ is the quotient and $ax+b$ is the remainder.
If we plug in $x=-3$, we get: $(-3)^3+3(-3)^2-(-3)-2 = q(-3)(-3+3)(-3+5) + (a(-3)+b)$. So $1=-3a+b$. Likewise if we plug in $x=-5$ we get: $(-5)^3+3(-5)^2-(-5)-2 = q(-5)(-5+3)(-5+5)+(a(-5)+b)$. So $-47=-5a+b$.
Subtracting $-47=-5a+b$ from $1=-3a+b$ yields $48=2a$ so $a=24$. Then $1=-3(24)+b$ so $b=73$.
Just like before the remainder is $ax+b = 24x+73$.
If you divide a polynomial $f(x)$ by a linear factor $(x-r)$, this same (second) technique says: $f(x)=q(x)(x-r)+???$ so $f(r)=q(r)(r-r)+???$ so $f(r)=???$. In other words, the remainder when dividing by a linear factor is just $f(r)$ (the polynomial evaluated at the root of $x-r$)! :)