Lets first try to understand the 1st case 1st :
a)At source end , we move down the hierarchy and hence network layer and data link layer is touched only once.After data link layer ,sender sends to router r1 via physical medium which comes under physical layer.
b) When the packet comes to r1 , now we know since router identifies IP address only , we have to go up the hierarchy so from physical layer to data link layer to network layer .Here we stop since we require IP address only .So network layer is touched only once but then again transmission to r2 is needed via physical medium.So data link layer is touched once again.
c) Same story repeats for r2
d)At the receivers end we go only up the hierarchy hence both data link and network layer are touched once only.
So number of times network layer is touched = 4
number of times data link layer is touched = 6
Now coming to your question similar logic can be applied and in that case , we need not go to network layer for 2-layer bridge since they are networking devices being used in data link layer.So only data link layer is required and touched once in these bridges.Hence in this case
number of times network layer is touched = 2[at source and destination only]
number of times data link layer is touched = 4[at source,destination , and each of 2 bridges]