Let's use a system of equations to solve the problem:
Let's call the number of boys in Mr. Taylor's algebra class "x". The number of girls in the class is "x + 5" (because the number of girls exceeds the number of boys by 5). The total number of pupils in the class is 39, so we can write the equation:
x + (x + 5) = 39
Simplifying this equation, we get:
2x + 5 = 39
Subtracting 5 from both sides, we get:
2x = 34
Dividing both sides by 2, we get:
x = 17
So there were 17 boys in Mr. Taylor's algebra class.
To find the number of girls, we can substitute x = 17 into the expression we came up with earlier:
x + 5 = 17 + 5 = 22
So there were 22 girls in Mr. Taylor's algebra class.
Therefore, the answer is: there were 22 girls in Mr. Taylor's algebra class.