5m2+15mp-2mr-6pr
Group the first two terms and the last two terms.
(5m2+15mp)-2mr-6pr
Factor out the greatest common factor (GCF) from each group.
5m(m+3p)-2r(m+3p)
5m(m+3p)-2r(m+3p)
Factor the polynomial by factoring out the greatest common factor, m+3p.
(m+3p)(5m-2r)
Factor 5m^2+15mp-2mr-6pr