Let h=height of the table top above ground; c=height of cat; t=height of tortoise.
So we can write c+(h-t)=170 and t+(h-c)=130. We need to find h.
We can rewrite these equations:
h+c-t=170, h-(c-t)=130. Now let x=c-t:
h+x=170, h-x=130. Add these two equations: 2h=300cm. h=150cm.
(We can also see that x=170-150=20cm, so the cat is 20cm taller than the tortoise.)
CHECK
Let's suppose the tortoise is 10cm tall so the cat is 30cm tall.
In the top picture the distance between the head of the tortoise and the table top is 150-10=140cm.
When we add the height of the cat to this distance we get 140+30=170cm.
In the bottom picture the distance between the head of the cat and the table top is 150-30=120cm.
When we add the height of the tortoise to this distance we get 120+10=130cm.
So this checks out and confirms that the table is 150cm high.