(x+3)(x+1) * (x-2)(x-5)

(3x^2+4x+3)(x-2) * (x-5)

(3x^3+4x^2+3x-6x^2-8x-6)(x-5)

(3x^3-2x^2-5x-6)(x-5)

3x^4-2x^3-5x^2-6x-15x^3+10x^2+10x+30

3x^4-17x^3+5x^2+4x+30

That make sense? There are other ways, but they depend on concepts that you may or may not know. This is known as FOIL'ing or distributing.