First, we should answer two simple questions.
1. How many ways can we travel from a-b?
2. How many ways can we travel from b-c?
This is given in the problem - because there are 7 roads connecting a to b, there are 7 ways to get from a-b. Because there are 6 roads from b-c, there are 6 ways to get from b-c.
Now that we understand this, we can use some logic to figure out the rest of the problem. Let's think about each case.
Let's go from a-b. We'll choose road 1 of 7. Now that we are in b, we have 6 more choices. This means that there are 6 ways to get to from a-c if we take road 1 when we go to b.
If we take any road going from a-b, there will be 6 options to get from b-c.
So, we can just add up the number of options because we know that there are 6 routes per road from a-b. This is simply 7*6 = 42. So, there are 42 ways to travel from a to c via b.