The goal of this challenge is to generalise the bitwise XOR function to other bases. Given two non-negative integers \$ x \$ and \$ y \$, and another integer \$ b \$ such that \$ b \geq 2 \$, write a program/function which computes the generalised XOR, described the following algorithm:
First, find the base \$ b \$ representation of \$ x \$ and \$ y \$. For example, if \$ b = 30 \$ and \$ x = 2712 \$, then the digits for \$ x \$ would be \$ [3, 0, 12] \$. If \$ y = 403 \$, then the digits for \$ y \$ would be \$ [13, 13] \$.
Next, pairwise match each digit in \$ x \$ with its corresponding digit in \$ y \$. Following on from the previous example, for \$ b^0 \$ we have \$ 12 \$ and \$ 13 \$, for \$ b^1 \$ we have \$ 0 \$ and \$ 13 \$, and for \$ b^2 \$ we have \$ 3 \$ and \$ 0 \$.
Let \$ p \$ and \$ q \$ be one of the pairs of digits. The corresponding digit in the output will be equal to \$ -(p + q) \bmod b \$, where \$ \bmod \$ is the modulo function in the usual sense (so \$ -1 \bmod 4 = 3 \$). Accordingly, the output digit for \$ b^0 \$ is \$ 5 \$, the next digit is \$ 17 \$, and the final is \$ 27 \$. Combining the output digits and converting that back to an integer, the required output is \$ 5 \cdot 30^0 + 17 \cdot 30^1 + 27 \cdot 30^2 = 24815 \$.
This definition retains many of the familiar properties of XOR, including that \$ x \oplus_b y = y \oplus_b x \$ and \$ x \oplus_b y \oplus_b x = y \$, and when \$ b = 2 \$ the function behaves identically to the usual bitwise XOR.
This challenge is code-golf, so the shortest code in bytes wins. You may not accept/output digit arrays of base \$ b \$, and your code should work in theory for all bases, and not be limited by builtin base conversion which limit your program/function from working for say \$ b > 36 \$. However, assuming that your integer data type width is sufficiently large is fine.
x, y, b => output
2712, 403, 30 => 24815 24815, 2712, 30 => 403 27, 14, 2 => 21 415, 555, 10 => 140 0, 10, 10 => 90 10, 0, 10 => 90 52, 52, 10 => 6 42, 68, 10 => 0 1146, 660, 42 => 0