Suppose there is a plank on a smooth surface and a man is standing on one end of it. The surface of plank is rough. Now the person starts to move towards the other end with some acceleration and the plank also starts to shift to keep the COM stationary as the only forces acting here are all internal. Now my question is,as the direction of the friction force on the man is in the direction of the displacement of man and same is the case with plank. Then in this case isn't work done by friction on the whole system coming out to be positive which should not be happening as if it is the case of static friction then the net work done should be zero and if it is the case of kinetic friction then the net work done should have been negative? Also please tell me whether the friction present here is kinetic or static.
Static friction can indeed do positive work, as can kinetic friction.
In your example the friction is static because there is no slipping. The important quantity, however, is not the displacement of the person, but the displacement of the material at the point of application of the force.
As the person walks forward along the plank the plank goes backward and the foot of the person also goes backward. So the force on the person is forward but the displacement of the foot (the point of application of the force) is backward, so the work done on the person by the static friction is negative.
In contrast, the force on the board is backward and its displacement is also backwards. The plank accelerates and increases KE. The static friction force on the plank does positive work.
I would strongly recommend re-contextualizing from
"This force does work on that thing with energy."
"This thing with energy does work (transfers power to) this other thing with energy by means of that force."
Much confusion and error may be avoided by doing this.
The system's translational kinetic energy does positive work on the system's thermal internal energy by means of the force of kinetic friction between blocks A and B.
The system's thermal internal energy does negative work on the system's translational kinetic energy by means of the force of kinetic friction between blocks A and B.
The two sentences above are the exact same statement. They have no differences whatsoever.
Further subdivisions are possible, e.g. the kinetic energy associated with block A may do positive or negative work on the kinetic energy associated with block B, and so on.