We are asked to graph the direct variation of the formation of ammonia with nitrogen on the x axis. That means that hydrogen is represented on the y axis. Ammonia is NH3, meaning one molecule of ammonia has one nitrogen and three hydrogens. So this is a N:H ratio of 1:3. So for x molecules of ammonia formed, we will need x atoms of nitrogen and 3x atoms of hydrogen. So graphing this as a linear equation requires a slope of 3. So we can graph the line y=3x to represent the direct variation:

Notice that for each increment along the x axis (nitrogen), we go up the y axis (hydrogen) by three. So at x=3, we have y=9 which corresponds with the information in the question above.