R4 needs a root port. It receives two BPDUs and it has to choose which port will become a path to the root. Both BPDUs has the same root cost and the same BID (because both came from the same switch). So the next tiebreaker is the value of the port, it chooses the lower port number, but there is a trap - you must check which port has lower number, but on the switch which is sending BPDUs, not receiving. So you are checking port numbers on SW3 and there are Fa0/21 and Fa0/23, so SW4 will choose root port connected to SW3's Fa0/21, which is Fa0/23. And yes, you are right - SW3's F0/21 will be designated port.
Next, SW3 and SW4 need to establish which port on the link between SW3 Fa0/23 and SW4 Fa0/21 will became designated port (the other one will be in blocking state). They check their root costs and SW3 has lower cost to the root, so SW3 will have both port in designated state. SW4 will have one root port (Fa0/23) and one port in a blocking state (Fa0/21).