Percent errors are calculated by dividing the absolute value of the errors by the exact length. What the student did wrong here is that he or she divided the given measurements by the exact lengths, which should not be the case.
Correct percent errors:
19 cm
percent error = (I19 - 20I / 20) x (100%) = 5%
21 cm
percent error = (I21 - 20I / 20) x (100%) = 5%