Not really clear what you are trying to replace as you have two replaces going on there, but the normal format will be:
replace(Text, Find, Replacement-Txt)
Example:
Here we have a Global Variable Text and has as a Value = "Apple Orange Banana"
If we want to replace the word "Orange" with "Fruits" we will do:
Set Var Text To: replace(Text, "Orange", "Fruits")
The result will end up like this:
"Apple Fruits Banana"