You can solve this algebraically as shown in the graphic here: https://drive.google.com/file/d/1e9an6DDWhC-FFj1aJZe_zxWsOmi6E-tX/view?usp=sharing. To calculate the distance between two points, you only need to know their coordinates: (x1, y1) and (x2, y2), and the distance formula:
distance = sqrt( (x2-x1)^2 + (y2-y1)^2 )
In this problem, you are given (x2, y2) as (-2, -1), you know that x1 must be 2, and you know that the distance must be 5. All you need to do is solve for y1! The final answer is (2, -4) and (2, 2).
There are a few tricks that allow this problem to be solved more easily than the algebraic method. All points with an x-coordinate of 2 will be 4 units along the x-axis away from the point (-2, -1). Since you are searching for a point whose distance from (-2, -1) is 5 and whose x-coordinate is 2, you can construct a 3-4-5 triangle to determine this mystery point. The horizontal leg of the triangle will is 4 (which is the distance from -2 to 2), and the hypotenuse of the triangle is 5 (which is the distance from (-2, -1) to the mystery point), so the missing leg of the triangle (the vertical leg) must be 3. Because it is the vertical leg, it can be three units up or three units down. This gives the same answer as the algebraic solution of (2, -4) and (2, 2).