Triangle and Algebra Advanced Problem