Java Split String Into Multiple Variables Solver Mathematical Problem