We have that the block is moving horizontally. Hence, its potential energy due to gravity stays the same. The only change in its mechanical energy is the one due to the change of speed. This reduction of its kinetic energy, due to the conservation of energy, is equal to the work that friction does. We have that at A the kinetic energy is : K=1/2*m*u^2=10*10*10/2=500J. At B, we have that K=1/2*10*16=80J. Sine we have that the initial value is 500, the work from the friction force (opposite to the movement of the object) is 80-500=420J.