Question 1183613
<br>
And here is a third and very different way to solve the problem....<br>
We need to have<br>
{{{(px+q)(x^2-3x-4)=ax^3+bx^2-5x+2a}}}<br>
Perform the multiplication on the left...<br>
{{{px^3+(q-3p)x^2+(-4p-3q)x+(-4q)}}}<br>
... and equate coefficients:<br>
x^3: p=a [1]
x^2: q-3p=b [2]
x: -4p-3q=-5 [3]
constant: -4q=2a --> q=-0.5a [4]<br>
We have 4 equations in 4 unknowns, which could have led to a messy solution.  But things work out nicely....<br>
Substitute  [1] and [4] into [3]:
-4a+1.5a=-5
-2.5a=-5
a=2<br>
Then
p=a=2
q=-0.5a = -1
b = q-3p=-1-6=-7<br>
ANSWER: a=2; b=-7 (and p=2; q=-1)<br>
CHECK:
{{{(2x-1)(x^2-3x-4)=2x^3-7x^2-5x+4=ax^3+bx^2-5x^2+2a)}}}<br>