Starting from B, and working upwards and to the left, label each node with the number of paths from there to B.

For the nodes immediately to the left of B, and also for those immediately above B, there is only one available path to B. For each other node, the number of paths from that node is the sum of the numbers for the nodes next to it on the right and below. Working all the way back to the node at A, you get the answer 34 for the total number of paths.

Use the same method for the other part of the question.