There's no question that teachers are unequivocally underpaid; anyone arguing that point is being intentionally obtuse in my mind.
That said, this math shows nothing concrete and we can certainly find more convincing evidence. I understand that the idea is to make it as simple as possible so that everyone can see clearly how badly we need to raise teachers' salaries, but we can't be disingenuous to do it.
This math completely disregards the idea that the teacher paradigm basically faces an equivalent idea to decreasing returns to scale (I mean this in the sense that doubling the amount of students a teacher is responsible less than doubles his/her time/effort requirement). Stating that a teacher should be paid double for teaching 30 students as opposed to 15 is not an accurate depiction of what the job entails (in general). Maybe this type dynamic is accurate for special needs classes or really young grades where the majority of the job is direct teacher/student interactions. But as the students get older and actual lectures become an increasingly central aspect of the job, using a constant valuation system really doesn't work.
Again, not disputing the result, just questioning the proof.