Most measurement systems these days are metric, which means they are based on the decimal system. So we have 100 centimetres in a metre, 100 cents in a dollar, 100 pennies in a pound, one thousand metres in a kilometre, and so on.
But there are still some systems that are not based on tens, hundreds, thousands, etc. Miles, yards, feet and inches is one such system. There are 12 inches in a foot. If you are not used to thinking in terms of twelves you can use your imagination. Imagine a box that will contain balls all the same size. Next to it is another box, which we’ll imagine is empty. The first box can only hold 12 balls. This box represents inches. Each ball represents one inch. We use the second box to count how many times the first box overflows because it contains more than 12 balls. The second box is the feet box (I suppose it could be a shoe box!).
We start to fill the first box, the inch box. Let’s imagine we have 20 balls to put into the first box. We can get 12 balls in the first box. Now the first box is full, so we put one ball (perhaps a larger ball) in the second box to show that we have filled the first box once, and we empty the first box so we can start to fill it again with the balls that were left over. There were 8 balls left out of the 20, and we put them into the first box. There aren’t enough balls to fill the box again. So, we have one ball in the feet box and 8 balls in the inch box. So the 20 inches, represented by 20 balls, is the same as one big ball in the feet box and 8 balls in the inch box. The two boxes represent the measurement written as 1ft 8in, or 1'8".
In the question we had 40 feet, which we can think of as 40 large balls to be added to the feet box, which already contained one large ball. So we have 41 large balls, or 41 feet. The number of balls in the inch box doesn’t change because we had no smaller balls to add, so we still have 8 smaller balls, or 8 inches. That’s how we made up 41 feet 8 inches.
Taking away 2'6" means we remove 2 large balls from the feet box leaving 39 feet, and we take 6 smaller balls from the inch box leaving 2, that is, 2 inches. So we get 39ft 2in or 39'2".