Python Solution
Code
![image.png](https://assets.leetcode.com/users/images/f6df2aea-3566-4b65-a5c1-d915c86f517d_1743406110.9706118.png)

# Code
```python3 []
class Solution:
    def canBeEqual(self, s1: str, s2: str) -> bool:
        i, j = 0, 2
        arr1, arr2 = [], []
        for s in s1:
            arr1.append(s)

        for s in s2:
            arr2.append(s)

        while j < 4:
            if arr1 == arr2:
                return True
            arr1[i], arr1[j] = arr1[j], arr1[i]
            i += 1
            j += 1

        if arr1 == arr2:
            return True

        arr1[0], arr1[2]= arr1[2], arr1[0]

        if arr1 == arr2:
            return True
        return False

```
['Python3']