$3, 4$ are orbits of $f$ of order $3, 4.$ You ask for "the value" of $f(7),$ so we may simplify by assuming that $3, 4$ are actually fixed points of $f.$
We get $3=f(3) = 3A+B-81, 4 = f(4) = 4A+B-128,$ which is a system of linear equations with solution $A = 48, B = -60.$
$3, 4$ are orbits of $f$ of order $3, 4.$ You ask for "the value" of $f(7),$ so we may simplify by assuming that $3, 4$ are actually fixed points of $f.$
We get $3=f(3) = 3A+B-81, 4 = f(4) = 4A+B-128,$ which is a system of linear equations with solution $A = 48, B = -60.$
Finally, $f(7) = -245 + 7A + B = \boxed{31.}$