Both block A and B mass 3kg and are initially 2m above the ground. They slide down a smooth ramp and then across a rough surface with a speed of 4m/s. How much energy did the block lose due to the friction along the rough surface? AND is transformed into what form of energy?

It makes no difference what the mass is or that there are two of them.

When falling H = 2m, if there were no friction the speed would be sqrt(2gH) = 6.26 m/s, but the speed achieveed is only 4 m/s.

(4/6.26)^2 = 41% is the fraction of
energy remaining .
59% is converted to heat.