Given that the profit is represented by:
P(x)=x^2-5x+6
where x is time in years, the time when the profit was $2 million will be evaluated as follows:
from:
P(x)=x^2-5x+6
substitute P(x)=2
thus
2=x^2-5x+6
simplifying this we get:
x^2-5x+6-2=0
x^2-5x+4=0
factoring the above we obtain:
x^2-x-4x+4=0
x(x-1)-4(x-1)=0
(x-1)(x-4)=0
hence
x=1 or x=4
Thus the company made $2 million at time x=1 year and x=4 years