That solution is close, but I don't think it will work too consistently. To see what I mean:
Preview the form.
Enter "aaa" in field1. Text field's value changes to "aaa" (expected)
Enter "bbb" in field2. Text field's value remains as "aaa" (expected)
Delete contents of field1. Text field's value remains as "aaa" (unexpected)
Change contents of field2 to "bbbb". Text field's value changes to "bbbb" (expected)
Enter "aaa" in field1. Text field's value remains as "bbbb" (unexpected)
The italicized parts show where the behavior is inconsistent.
To accomplish what you described in the original post, add the following rules to both field1 and field2 (it should be exactly the same two rules for both fields):
Rule 1 - Condition: field1 [is blank] Action: set Text field to value of field2 (when field1 is blank, the text field's value is the value of field2)
Rule 2 - Condition: field1 [is not blank] Action: set Text field to value of field1 (when field1 is not blank, the text field's value is the value of field1)