domain and range of the piecewise function

y = { 5 (x < 0 ) }
{ -(x+1)^2 (x<= 0)}

Would it be domain (-infinity , 0)
Range : (-infinity, -1] U (5, infinity)?
Thanks!

You appear to have a misprint or typo.

you have y = 5, for x < 0
that is a straight horizontal line 5 units up from the x-axis, and to the left of the y-axis.
You have y = -(x+1)^2 for x ≤ 0
which is a parabola with vertex at (-1,0), opening downwards and showing only that part to the left of the y-axis
but that contradicts your first piecewise function.
e.g. in the first: if x = -8, your y = 5
in the second: if x = 8, your y = -(8+1)^2 = -81