Why do I have to integrate the function of the power to get the function of the work if both the force which is applied to the object and the displacement are changing?
Both the force and the displacement are function of time And the textbook says that I can't use this formula
W = F . s without giving any details.
Why can't I just manipulate force and displacement to get the work function?
You could think about why you need to integrate velocity to get position if it is changing with time. The idea is the same. $W=Fs$ works when the force is constant because it is the same as the integral. So does $s=vt$ when the velocity is constant.