how do we know 7,4,5 are the sides of triangle

The sum of the two smaller sides must be greater than the third side.

More generally, the sum of any two sides must be greater than the third side.

Given the three sides, the largest must be less than the sum of the other two.