Is it possible to replicate in a cascading manner and in a peer to peer manner on an intermediate node using the same port number
This kind of topology cannot work. For the sake of example, if one were to replicate between A and B in a peer to peer manner and from B to C in a cascading (or data distribution) manner, then one cannot use the same port for replication between A and B and between B and C. For replication to happen between B and C, it is imperative that the parameter SP_OCT_REPLICATE_POSTER be set to 1 so that Capture sending data from B to C does not ignore the actions of Post from A to B. However, this will also cause Capture from B to A to pick up changes applied by Post from A to B. This will result in loopback of changes back to A. This side effect is not desirable. The problem here is that Capture cannot be directed to selectively ignore actions of Post for one replication stream and not for the other.
The only alternative is to use another port for replication between B and C. This will of course require a separate instance of Shareplex to be created. Remember that the port # and Shareplex instance have a one-to-one correspondence.