This is a particular case of the Eilenberg-Watts theorems. I have written a post about them here. They say that
If $F:\mathcal A\longrightarrow\mathcal B$ is a functor between (say left) module categories, then the following are equivalent:
$(1)$ $F$ preserves colimits
$(2)$ $F$ is a left adjoint
$(3)$ $F\simeq -\otimes M$ for some bimodule $M$
$(4)$ $F$ preserves cokernels and coproducts
Similarly
If $G:\mathcal A\longrightarrow B$ is a functor between module categories, then the following are equivalent
$(1)$ $F$ preserves limits
$(2)$ $F$ is a right adjoint
$(3)$ $F\simeq {\rm Hom}(M,-)$ for some bimodule $M$
$(4)$ $F$ preserves kernels and products
There's yet a third version for the contravariant hom, which you can probably guess by now.
ADD To prove that if $F$ is an equivalence then $P$ is projective finitely generated for $A$ (it is also the case for $B$) you need to note that $P$ is the image of $A$ under $F$, so it is in fact finitely presented since being finitely presented is invariant under category equivalences (this follows from the fact that being finitely presented can be stated purely in functorial terms involving the hom: $M$ is finitely presented if and only if ${\rm Hom}(M,-)$ preserves filtered colimits), and since $\otimes P$ is exact (for it is an equivalence) it follows that $P$ is finitely presented flat, whence it must be projective.