We want to find the solution of the following system
Each equation of this system represents a line. If we have two parallel lines, the system has no solution, if we have congruent lines the system has infinite solutions, and if they just intercept each other at one point, this point is the solution for the system.
As we can see on the graph plotted on the question, those lines intercept each other at (2, 4), therefore, this is the solution.