This is a quadratic equation which means that it has two roots which is your X-Intercepts. As seen on the graph, your X-intercepts are 3 and 5 which are your roots. Simple bring them over to the other side so you have (X-3) and (X-5)
It is different because you are doing a different method to complete the problem. It is the same because it ends up with the same answer, provided you complete the process correctly.