solveThirdDegreeEquation function