In both ways you can say and write, since both words are approved by the Royal Academy of the Spanish Language.
If you look for the word replace in the digital version of the RAE, below is also the word replace, which means that the words are correct. These are their definitions:
- Substitute something for something else, put something else in its place to take its place. Like for example: I am going to replace/replace the flat tire with a new one.
- Succeed someone in the job, position or commission they had or accidentally take their place. For example: someone will have to replace / replace Catalina because she woke up sick.
Now that you know, you can be [email protected] and use both words. Share it with your friends to avoid arguments about which of the 2 words is correct.