I think they are asking for the following thing:
N.Y to Denver available flights Denver to San Francisco available flights
-------------------------------------------------------------------
x1, x2, x3, x4, x5, x6, x1, x2, x3, x4, x5, x6, x7
I have choosen the same airlines for Denver to San Francisco because of the last question.
Now, different ways in which you can reach from N.Y to San Francisco
= 6 * 7
= 42
Now, to find answer to last question, we apply inclusion -exclusion.
Answer
= total ways - #ways in which the flight taken from N.Y to Denver
is also continued from Denver to San Francisco
= 42 - 6
= 36