I am Preparing for an Exam, and this is one of my Exercises that I tried to solve, I know that the answer is : $-2<x\le1\frac{1}{2}$.
but Every time I try to solve, my answer is Different from the Right answer.
(I need to find the domain of the function)
$$y=\sqrt{\log_2(5-x)+\log_\frac{1}{2}(x+2)}$$