Complex Numbers And Quadratic Equations question 479

Question: If m is chosen in the quadratic equation $ (m^{2}+1)x^{2}-3x+{{(m^{2}+1)}^{2}}=0 $ such that the sum of its roots is greatest and the absolute difference of the cubes of its roots is equal to $ a\sqrt{5}, $ then a is

Solution:

Answer: 8