# How many different “up/right” paths are there from A to B which does not pass the vertex marked with "dot"

I am trying to solve part B. Here, I am trying to do number of total paths - ways to go through the shop. Which should yield the number of ways to get from A to B without going through the shop. However, I am really confused about how to calculate the number of ways going through the shop. Any pointers would greatly be appreciated.

If you know how to do part (a) for a general case with $$n$$ rows and $$m$$ columns, you can use that to solve (b).