A) There are 3 squares with 5 walls. If the line starts on the inside of any one, it has to end on the outside, and vice versa. That means that you have to wind up inside of 2 squares at once, which can't be done so the problem is impossible. B) The solution lies in the corner. How does it count if you go through a corner? Whether you count it as going through one wall or neither the problem becomes doable. For instance if you count it as going through both walls then going through the outside corner of the top right box means you can start and end outside of the top right box. So start in the top left box, go through the top right corner, and you'll fairly easily wind up doing it and going inside of the bottom center box. Without the analysis of part A it would be much harder to figure out where to start or which corner to go through to get the answer.