The question is asking for the distance travelled in only the third second. Your calculations have worked out the distance travelled in three consecutive seconds, so you need to subtract the distance travelled in two seconds from that to get the distance travelled in just the third second.
45= 0*3 + 0.5*10*3^2
20=0*2 + 0.5*10*2^2
45-20=25