As someone who spends time trying to get students to use Maple to solve physics / engineering problems because I would rather have them work on those problems, and not math problems, I can understand your frustrations. There are many times I find Maple coding to be less than "math intuitive."
However, for this situation, let me say, what are you trying to do ? Are you trying to take the derivative of f(x) with respect to x and then set the x in the outcome to be equal to 3? This outcome would be 3. Or, are you trying to take the derivative of f(x) after you have put in the value of 3 for x? Because that is how I initialy read it. (Think arcsin(sin(x)). Pass x to sine, do the calculations, then do the arcsin of the resulting calculation.) For this reading, the outcome is 0.
Since I'm going to assume the former, then what one needs to know, when Maple sees g(x), x is a variable. However, when Maple see f'(x), it sees the " ' " as the derivative with respect to the variable x. So for me, the most readable and understandable way to write these statements is:
It performs the calculation of the derivative before it evaluates the outcome using x1 as the value for x.