Let a = the number of 5th graders and b = the number of 4th graders.
b = 3a
a + b = 36
There are 2 ways we can solve this.
1. Substitute our "value" for b in the 1st equation for b in the 2nd equation.
a + 3a = 36
4a = 36
a = 9
2. Solve the 2nd equation for b.
b = 36 - a
Now that b has two "values," they equal each other.
36 - a = 3a
4a = 36
a = 9
As you can see, both ways get you the same answer.