Formulas in predicate logic/2 places

Two different variables
2 * (2,2) = 6

Both variables coinciding
2 * (2,1) = 2