How to replace the charactors in the string?

It doesn’t work properly. The request image means every character changes ( ‘a’ to ‘o’ and ‘o’ to ‘L’) independently against the original string.