The roots of the polynomial are the solutions to that equation.
If you consider the original equation,
, and the equation you're solving,
, the connection is that y=0.
In terms of the graph, you're looking where the graph crosses the line y=0, which is the x-axis.
In short, the solutions to that equation are the x-values where your graph crosses the x-axis: 2 and 5.
You can double check this by substituting in 2 and 5 (one at a time) to verify that they are solutions to the equation.