Is there a formula to calculate base digit swaps given two specific bases? As most of you already know, $53$ in hexadecimal is $35$. A look at a table of conversions is enough to verify that no other number has this relationship between its decimal and hexadecimal representations.
I imagine that given two positive integers for bases, there is some kind of formula that allows one to find the number with this digit swap, or results in some undefined operation (like division by zero) if it's just not possible (e.g., binary and vigesimal).
What I have done: I noticed that $53 - 35 = 18$ and $16 - 10 = 6$, which is a divisor of $18$. Then I realized this was pointless.
 A: If the same integer has digits $cd$ when written in base $a$ and digits $dc$ when written in base $b$, that means (by definition) that
$$
ac+d = db+c \quad\text{and}\quad 1\le c,d<\min\{a,b\}.
$$
We can rearrange the equality to find
$$
c(a-1) = d(b-1).
$$
Define $g=\gcd(a-1,b-1)$ and set $\alpha=(a-1)/g$, $\beta=(b-1)/g$; then $\alpha$ and $\beta$ are relatively prime and $c\alpha=d\beta$; this means that there exists an integer $k$ such that $c=k\beta$ and $d=k\alpha$, and any such pair $c,d$ is a solution.
For example, with $a=10$ and $b=16$, we have $g=\gcd(9,15)=3$, $\alpha=(10-1)/3=3$, $\beta=(16-1)/3=5$, and so $c=5k$ and $d=3k$ for some integer $k$; the size restrictions on $c$ and $d$ force $k=1$ in this case, which reconfirms your observation that $(53)_{10} = (35)_{16}$ is the only example.
If we took $a=11$ and $b=16$, we would have $g=5$, $\alpha=2$, $\beta=3$, so that $c=3k$ and $d=2k$ for some integer $k$; this yields the examples $(32)_{11} = (23)_{16}$ and $(64)_{11} = (46)_{16}$ and $(96)_{11} = (69)_{16}$.
