The intersection of the first-order function y = - 2x + B and the x.y axis forms a triangle. The area of the triangle is 9. How to find the first-order function?

The intersection of the first-order function y = - 2x + B and the x.y axis forms a triangle. The area of the triangle is 9. How to find the first-order function?

Find the intercept, x = B / 2, y = B
xy/2=9
So B = + - 6, so the function is y = - 2x + 6 or y = - 2x-6