I found this exercise of factoring:
$$5a^2 + 3a - 2$$ is a trinomial of the form:
$$ax^2 + bx + c = \frac{(ax + p)(ax + q)}{a}$$
I made this:
$$3 = p + q$$
$$-10 = pq$$
then, I need to get the values of $p$ and $q$.
$$p = -\frac{10}q$$
replace:
$$3 = -\frac{10}q + q$$
$$q^2 -3q - 10 = 0$$
$$(q - 5)(q + 2)$$ That is two possible values of $q$
I need to check the correct value now:
$$3 = p - 5\implies p = -8$$ but $8 \times 5 \neq -10$, so the correct value of $q$ is $2$.
Replace to check if is true:
$$3 = p - 2\implies p = 1$$ but $1 \times -2 \neq -10$
In the end, the correct values impressively were $5$ and $2$, which I had obtained in the equation of $q$, but with a changed sign. $$p = 5, q = -2$$
So, what am I doing wrong factoring this expression? Is it a property that the result was that? or was it coincidence
PD: the total factoring was: $(a + 1)(5a - 2)$
The mistake is when you stated that $(q-5)(q+2)=0$ has solutions $q=-5,q=2$.
Instead, you have $$q-5=0\quad\text{and}\quad q+2=0$$ giving $q=5$ and $q=-2$ and so substituting gives $$3=p+5\implies p=-2\implies pq=-2(5)=-10$$ and $$3=p-2\implies p=5\implies pq=5(-2)=-10$$ as desired.