[tex]AB= \sqrt{ (x_{A}- x_{B})^2+ (y_{A}- y_{B})^2 } \\ 5= \sqrt{(0-4)^2+(-2-m)^2} \\ 5= \sqrt{16+(m+2)^2 } \\ 25=16+(m+2)^2 \\ 9=(m+2)^2 \\ \\ m+2=9 \Rightarrow x=7. \\ m+2=-9 \Rightarrow x=-11. \\ \\ \underline{Solutie}: \boxed{x \in \{-11;~7\} }.[/tex]