Why they have the same velocity?
Because static friction is an adjustable force. Its aim is to prevent sliding, and it adjust to whatever is needed to prevent that.
The forces acting on the bottom book are the push $P$, air resistance $D_{bottom}$, bottom kinetic friction $f_k$ and top static friction $f_s$, and they all cancel to zero, since we have no acceleration, according to Newton's 1st law: $$\text{Bottom book:}\quad \sum F=P-D_{bottom}-f_k-f_s=0$$
The forces acting on the top book are air resistance $D_{top}$ and the static friction $f_s$, which is equal to that before but opposite: $$\text{Top book:}\quad \sum F=-D_{top}+f_s=0$$
Now, both of these equations are true at the same time in this constant-speed situation.
Now, imagine that you suddenly push double as hard:
- $\sum F=P-D_{bottom}-f_k-f_s$ is then no longer zero, but equal to $ma$ (Newton's 2nd law), so the bottom book accelerates.
- The top book follows along, since $f_s$ will adjust and increase to prevent sliding, so $\sum F=-D_{top}+f_s$ no longer equals zero, but $ma$. $f_s$ makes sure that this $a$ equals that of the bottom book - otherwise there would be sliding.
- This acceleration increases the velocity of both books, which increases $D_{top}$ and $D_{bottom}$, since they depend on velocity.
- As they increase, they reduce the total force, and both $\sum F=P-D_{bottom}5. f_k-f_s$ and $\sum F=-D_{top}+f_s$ will reduce and gradually become closer to zero. The air resistances in this way gradually balances out the equations again and the accelerations gradually decreases.
- In turn, these decreasing accelerations cause $f_s$ to be smaller, since a smaller force is needed to prevent sliding.
- Soon, $f_s$ and $D_{top}$ meet and become equal in $\sum F=-D_{top}+f_s$ so the total force on the top book equals zero again. This can only happen when also $\sum F=P-D_{bottom}-f_k-f_s$ has balanced out to zero again, because only then are there no more accelerations of the bottom book, which $f_s$ has to induce into the top book as well. $f_s$ is left to take care of only the air resistance on the top book, although at a new value.
So, the new push has caused a new velocity, new air resistances and a new $f_s$. $f_k$ has been constant all the way, since it doesn't depend on velocity or anything else that is varying here. All in all, the $f_s$ will always adjust to keep the books from sliding. It has a limit of course, and if it at anytime during these steps had to be larger than its limit, then it would let go and sliding would start (and kinetic friction would replace it).