Most likely in vce it does have an inverse so for your purposes you should probably ignore me.Just saying that according to the mathematical community it wouldn't. Check the definition
here. Wiki also uses this definition
here and it even says that:
When using codomains, the inverse of a function ƒ: X → Y is required to have domain Y and codomain X.
But in question 7, R is "too big" for a codomain. If instead that question had the codomain as [2,6] then it would be fine according to this definition.
It's a better definition in higher mathematics when you're doing more complicated things. But since in vce you are only interesting in sketching graphs etc. I guess we don't need such a definition.