Surely you know that "f(x)= 0" has nothing at all to do with the domain? And the value of f(2) (or the limit as x approaches 2 from above) has nothing to do with the domain. The domain is a matter of values of x, not values of f(x).
You are are told what f(x) is for all x less than or equal to 2 and for all x greater than 2. That covers all possible values of x doesn't it?
Are you clear on what "domain" means?