When I have to do stuff like this I'll usually end up looking at known lengths like bricks or ceiling/floor tiles, count them, and then add them up. Or at objects that are likely to be a usual length like furniture or like cars and look up the length of the car.
Sometimes I'll even take a piece of paper and place it's edge against the length I want to measure, mark it, and then compare that to known lengths and try to guesstimate the distance. But if the picture is at an angle or the other lengths are in different pictures this might tell you something but probably won't work.
I've also used triangulation if I know some of the distances.
The one real saving grace is people usually use predictable parameters so sometimes it's just plugging in numbers, compare what you have to the picture and adjust if necessary.
And in an extreme example, I ended up drawing a building assuming the some distances in the picture and based what I seen tried to make it proportionately right and with the above point about predictable parameters I wasn't that far off.