Find the value of q such that qx^2 -5qx-3 divided by x +2 has a remainder of 4.