If all the cheese slices have same mass, say m grams
and mass of 3 cheese slices is 27
so,
m+m+m=27
3m=27
or m=27/3
m=9
thus
mass of one cheese slice is 9 grams
You pass the x in one side and numbers to the other side
8x-5x=58-4
add and subtract
3x=54
divide by 3
x=18
All of these sets meet the requirements of the triangle inequality. The sum of any two numbers in the set is greater than the third one. (You really only need to check that the sum of the smallest two is greater than the largest.)
It can help to resolve the numbers that are only indicated as to value.
√13 ≈ 3.606
2√10 ≈ 6.325
_____
Your comparisons can be ...
2 + 3 = 5 > 3.606 . . . is a triangle
5 + 5 = 10 > 6.325 . . . . . . is a triangle
5 + 12 = 17 > 15 . . . . . . . . is a triangle