Let's understand full write mechanism so that you can get the full concept of this structure.
DS --> DN1 -->DN4 --> DN6
The above structure of data nodes shows that the order can't be a break so that the Data streamer should know how the data is traversing and to which data node to data node the data is been copied.
Data Streamer will transfer data to Data node 1 and Datanode 1 will transfer data to Data Node 4 and the process continues.
While receiving Acknowledgement data Node 6 will first respond that data is copied in me and it will send acknowledgment to Data Node 4 then data Node 4 will send acknowledgement to data node 1 that in data node 6 and on my data is been written then data node 1 will be responding data streamer that pleases acknowledge name node that the data is been written to all three data nodes.
This process is followed in data transfer state.
When transferring data node 1 to data node 4 this is the flow:
DN1--> switch on rack 1 -->core switch-->switchon rack 5 -->DN4
Switch involvement comes only in data transferring not in sending acknowledgement state.
Coming to the scenario of Blocks
Data is very vast so we have divided into two blocks A and B.
A is stored in Rack 1 and then it is stored in Rack 4 which is fulfilling Rack awareness 3 rules.
B is randomly stored in Rack 1 randomly than in a different rack, it needs to store another replica so it chooses that fulfils rack 7 and 2 and 3 rule of rack awareness.
Hope this helps.