X -2, 0, 3, 4

Y 6, -2, -14, -18

Write the function

I'm assuming that the first X corresponds with first Y, and so on.

Slope: -4
y=-4x+b (b= y intercept)
Substitute x and y with -2 and 6
6=8 +b
b=-2
Function: y=-4x-2