Quotient and remainder of a polynomial when divided by x+2 are 2x-1 and 3 respectively. Find the polynomial.