mfb said:
I think the question is meant as g(f(6))=12, g(f(8))=20, find g and f. There are many possible pairs of functions, the two found by Natasha1 are the easiest ones (and the only pairs that involve just a single elementary operation per "machine").
(I'm pretty sure that Natasha1 has found only one such composite machine. After all, 4x − 12 = (x − 3)⋅4 , as pointed out by Halls.)
I doubt that this is the correct interpretation.
As you say, if we are looking for functions, ƒ and
g, such that ƒ○g maps 6 → 12 and 8 → 20, there are many such pairs. I suspect that there are infinitely many such pairs.
OP has discovered a linear function, let's call it
h, such that
h(6) = 12 and
h(8) = 20. That function is defined by
h(x) = 4x − 12.
A nice characteristic of linear functions is that the composition of two linear functions is a linear function.
There are two linear functions, ƒ and
g such that ƒ○ƒ =
g○g =
h , where
h(x) = 4x − 12, i.e. ƒ(ƒ(x)) =
g(
g(x)) = 4x − 12 . I am convinced that these are the two functions intended by the author of the problem.