Let’s break it down.
Let:
T = height of the table
D = height of the dog
B = height of the bag
From the first picture (dog on table, bag on floor):
T + D - B = 170
From the second picture (bag on table, dog on floor):
T + B - D = 130
Now add the two equations:
(T + D - B) + (T + B - D) = 170 + 130
The D and B cancel out:
2T = 300
T = 150
✅ The height of the table is 150 cm.