Solving problems with similar and congruent triangles