Did he calculates the work done by the spring force correctly !
Because he wrote (Sf - Si )^2 , but is must be (Sf^2 - Si^2 ) .
The work done on the spring to get it from 5" to 2" is k*3^2/2
The work done on the spring to get it from 5" to 4" is k*1^2/2
Hence the work done on the spring to get from 2" to 4" is k*(1^2 - 3^2)/2 or -k*(3^2 - 1^2)/2 (it's the work done by the spring that's positive here of course, so the work done on the spring is negative).
The work done on the spring to get it from 5" to 2" is k*3^2/2
Here how did you get 3^2 ? it must be ( 5^2 - 3^2 ) according to ( Sf^2 - Si^2 ) !