...like "solve" in the third. For something simple like this, a nested if statement would work in the output cell, like:
= if (a = "solve",F/m,if(m = "solve", F/a,if(F = "solve", m*a)))
for more complex equations, the same thing can be accomplished in a user defined function.
=...