Let the age be x.
Given,
[tex] x^{2} - 23x = 50[/tex]
[tex] x^{2} - 23x - 50 = 0[/tex]
[tex] x^{2} - 25x + 2x - 50 = 0[/tex]
[tex] x(x -25)+2(x-25)=0[/tex]
[tex](x+2)(x-25)=0[/tex]
Hence, x = -2 or 25.
Since, the age of the teacher cannot be in negative, the age of the teacher is 25 years.