In your case, One copy of the block is written to a node in one rack; two copies are written to two nodes in a different rack.
Actually, what happens is HDFS uses rack-aware replica placement policy. In default configuration there are total 3 copies of a datablock on HDFS, 2 copies are stored on datanodes on same rack and 3rd copy on a different rack.
Hope this helps!