The polynomial expression (ax^2+2)(x^2-3x+1)-(12x^4-36x^3) is simplified to 14x^2-6x+2. What is the value of a?

The polynomial expression (ax^2+2)(x^2-3x+1)-(12x^4-36x^3) is simplified to 14x^2-6x+2. What is the value of a?