Solving quadratic equations by factorising