I was wondering is there any algorithm, method, concept, idea for "Reverse Calculation"?

Basically I provide an output/Answer , and 1 or more inputs, then it will result the math formula/pattern.

For example 1:

I provide, Dynamic Output: 30;

I provide, Dynamic Input Value A: 2

I provide, Dynamic Input Value B: 3

I get, Result: 5 x 2 x 3 = 30

For example 2 :

I provide, Dynamic Output: 140;

I provide, Dynamic Input Value A: 4

I provide, Dynamic Input Value B: 7

I get, Result: 5 x 4 x 7 = 140

Based on Example 1 and Example 2, the formula I am looking for is:

5 x [Dynamic Input Value] x [Dynamic Input Value] x [Dynamic Output Value]

5 x A x B = C

5AB = C

5=C/AB

Thus the formula I need is "C/AB".

Is there any A.I algorithmic solution for this?

JJ