This is because the red and blue lines cross at (0,-2). We don't really need to worry about the y coordinate here. For this problem, all we care about is the x coordinate, which is x = 0.
When x = 0, the outputs of each function f(x) and g(x) are both the same value. So that's why we can say f(0) = g(0). It's the same as saying f(x) = g(x) has the solution x = 0.
The 10$ is added on because it's a one time exchange and the 8 is multiplied by the x because for every hour you add 8$ to the price and y is the total price at the end depending on x.