Hi, this question is actually really simple.
Let's consider that one house = 7 matchsticks. This is because, if we count the first two squares given in your question, it will count to 7.
Now we understood that one house has 7 matchsticks. So, if we want two houses, then consider two more square of matchsticks. So, 12. Likewise, for 3 houses , add 2 more squares, thus resulting in 17. For four houses, again add 2 more squares, giving the result as 22 matchsticks.
Note- While adding two more squares for each, do not count the left side 2 matchsticks, as they are combined with the previous matchsticks. I meant that , if you want to know 2nd house matchsticks, count 7+7=14, then subtract 14-2, so 12
Conclusion-
Now, the brief answer is:-
1 house = 7 matchsticks
2 houses = 12 matchsticks
3 houses = 17 matchsticks
4 houses = 22 matchsticks
5 houses = 27 matchsticks
Hope it helps you...
(Answered by Benjemin)