Server A:
If new file or any file changed, take the file and look in server B. if not found add it else replace it.
For the sake of discussion, consider a folder on Server A being "on the left" and the corresponding folder on Server B being "on the right".
The operation you are describing would then be considered "COPY TO RIGHT" (as opposed to "mirror to right") for all the "differences" discovered when comparing the files of the two folders being compared on the two servers.
In contrast, the "mirror to right" function would then delete any "orphan" files found on Server B which were non-existent on Server A. The "copy to right" function does not perform this extra step.
Server B
If new file or any file changed, take the file and look in server A. if not found add it else replace it.
This is the exact opposite of the first operation. So this one is considered "COPY TO LEFT".
Will this logic work? if yes then could you please share me the script for one server.
I suggest you download the software yourself (again, free trial, fully functional) and familiarize yourself with its interface and capabilities. You should probably start off playing around using the GUI, comparing two folders (which you navigate to on the left side and the right side), and pushing the "same", "differences", or "all" buttons, so that you understand what the program can do.
When you right-click on one or more selected files on left or right or both sides, the context menu then offers you lots of functions that are then appropriate for you to choose from. When you select that function at the operation is performed and you see the result, you will have learned what's actually going on.
Then look into HELP for "script" and you will now understand how to code the batch commands. Try out a simple case, and you will have learned some more.
I don't know exactly what you mean by "Server A" or "Server B" insofar as does that mean a low-level folder by itself, or does it mean a "parent folder" including all sub-folders, etc. I don't know exactly what files inside this folder structure you want to compare. Only you really understand what you're asking. So my suggestion is simply to try it out, and learn for yourself through trial and error and HELP.
Note that you have all kinds of "session settings" options as well, to define exactly how the comparison should be performed. For example you can have the program ignore date/time differences in files due to Daylight Savings Time vs. Standard Time.
Also, each "compare job" is automatically remembered and appears in a "session list" when you open the program... for you to choose from. So once you do a compare one time you don't have to re-create it from scratch the next time you want to perform the same comparison. Just pick it from the list and "open" it to populate the left and right panes. You can then edit it if you want, before actually performing it.
Honestly, I think you will like the GUI very much.