Math and processing

Sorry for beeing unclear but I would like the students to write a program that both calculates the values for x and y and simultaniously show the graph for the two functions to visually display the intersection. I basically need a standard coordinate system as shown in the image I posted.