Jelly, 8 7 bytes
Vf96SạP
Input is as an array of two integers: first the right opererandoperand, then the left one.
How it works
Vf96SạP Main link. Argument: [b, a]
V Cast [b, a] to string, then eval the resulting string.
For [b, a] = [9, 6], this yields 96.
f96 Filter with 96, yielding [96] if V returned 96, [] otherwise.
S Take the sum, yielding either 96 or 0.
P Compute the product of [b, a], yielding ba = ab.
ạ Compute the absolute difference of the results to both sides.
When the sum is 0, this simply yields the product.
However, when [b, a], = [9, 6], this yields 96 - 54 = 42.