1 So if these two wallet connected there will be a problem?the one with longer Blockchain will kickoff the shorter one
No. There are a key number of differences between Bitcoin Cash and Bitcoin. First of all, there are apparent block size change which Bitcoin does not have. Per the reference nodes, these are invalid and Bitcoin Core will reject any blocks with a block weight of 4MB.
However, since Bitcoin Cash doesn't have Segwit, each byte of the normal transaction will count as 4 byte in the block weight.
Secondly, with the different Sighash, those transactions generated on the Bitcoin Cash client will not be valid on the Bitcoin network and any blocks with those transactions are also rejected.
Hence, Bitcoin Core will not consider the other Blockchain as valid, even if it has a longer proof of work.
2 you change the port?how can the wallet communicate if you change the port
You can. Both clients have a list of nodes which they can connect to first. You don't need to portforward the clients to get connections(outgoing) since you're connecting to others.