Let the roots of the quadratic equation are α and β, then (arithmetic mean) 2α+β=8 and (geometric mean) αβ=5 ⇒α+β=16 and αβ=25
Now, if roots are α and β, then quadratic equation is x2− (sum of roots )x+ product of roots =0 ⇒x2−(α+β)+αβ=0 ⇒x2−16x+25=0