Econometrics - marginal effect of x on y at average values
"They knew" because they have written down the models. Ignoring other variables, the log-log specification is

$$\ln y = \beta\ln x \implies e^{\ln y} = e^{\ln x ^{\beta}}$$

$$\implies y = x^{\beta} \implies \frac {\partial y}{\partial x} = \beta \frac {x^{\beta}}{x} = \beta \frac {y}{x}$$

I guess the OP can work out the other model now.