Find the numbers and calculate output
JavaScript (ES6), 90 88 bytes

Takes input as an array of 6 digits. Returns a string describing a possible solution (such as '54*3==162') or exits with a 'too much recursion' error if (and only if) there's no solution.

f=(a,k=1)=&gt;eval(s='01*2==345'.replace(/\d/g,n=&gt;a[n],a.sort(_=&gt;(k=k*2%3779)&amp;2)))?s:f(a,k)


How it works

This is a deterministic algorithm.

The primes P=2 and Q=3779 were chosen in such a way that the sort callback (k = k * P % Q) &amp; 2 is guaranteed to generate all 720 possible permutations of the input array over time. More precisely, all permutations are covered after 2798 sorts -- which should be within the recursion limit of all browsers.

We inject each permutation in the expression 01*2==345 by mapping the digits to the corresponding entries in the array.

We evaluate this expression and do recursive calls until it's true.

Test



f=(a,k=1)=&gt;eval(s='01*2==345'.replace(/\d/g,n=&gt;a[n],a.sort(_=&gt;(k=k*2%3779)&amp;2)))?s:f(a,k)

console.log(f([1,2,3,4,5,6])); // 54*3==162
console.log(f([2,3,4,5,6,7])); // 52*7==364
console.log(f([1,2,3,4,6,7])); // 73*2==146