To make it easier, let me retype your question.
Write an equation with slope 0 and y intercept at (0,-2)
So, the easiest way to do this is in slope intercept form.
Slope Intercept form is given the general function Y=mx+b
M represents the slope, and B represents the Y-intercept value.
So if we plug our numbers in we get
Y = 0X -2
Which we can simplify to
Y= -2