If 8 cm,5 cm and 7 cm are the sides of the triangle, then they should satisfy the inequality theorem. AB+AC>BC
AB+BC>AC and
BC+AC>AB
Let AB=8 cm,BC=5 cm and AC=7 cm
Then
AB+BC>AC
8+5>7
⇒13>7
BC+AC>AB
5+7>8
⇒12>8
AB+AC>BC
8+7>5
⇒15>5
All the three conditions are satisfied, therefore a triangle can be formed with sides 8 cm,5 cm and 7 cm