setValue() How do I change to synchronization?

Simple example:
text1.setValue(“TestA”);
text2.setValue(text1.value);
text1.setValue(“TestB”);

↓I looked at past questions but couldn't get it to work.