x: students y: adults
x + y= 595
3x + 5y = 1951 >> ( you can replace "x" or "y") >> x= 596 - y (then you replace this in the other equation)(
3·( 595 - y) + 5y= 1951
(3·595) - (3·y) + 5y= 1951
1785 - 3y + 5y= 1951 ( now you put the terms wiyh leters in one side and the terms without leters in the opposite side)
-3y + 5y= 1951 - 1785
2y= 166
y= 166 : 2
y= 83
----------------------
Now, when you have "y", you replace "y" in one of the principal equations:
x= 595 - y
x= 595 - 83
x= 512
----------------------
Now you know how many tickets were sold for students: 512; and how many tickets were sold for adults: 83
x=512 y=83