For f(x) to be a function, the value of x should not be repeated. That is no x value can be more then once.
So the required table is

And for g(x) , not to be a function, we have to repeat x value that is

The line is 180 degrees in total so your equation would be-
X-6 + 8x + 24 = 180
9x + 18 = 180
9x = 162
Answer is: x = 18