I am trying to prove the equivalence of two definitions of a finite abelian category. One of the steps of the proof suggested by the author is the following:
Let $R$ be any ring such that category of $R$-modules is $\mathbb k$-linear for some field $\mathbb k$. And let $P$ be a non-zero projective $R$-module. Let's look at the ring (actually, an algebra) $\operatorname{End}(P)^{op}$ (in this question $A^{op}$ denotes $A$ with reversed multiplication: $ab = ba$). We'll call this ring $B$. Let $X$ be an arbitrary finite-dimensional left $B$-module. Since $P$ is a right $B$-module we can define $P \otimes_B X$ (for example, as a cokernel of morphism $P \otimes B \otimes X\to P\otimes X$, $p \otimes b \otimes x \to pb \otimes x - p \otimes bx$). Now we can formulate our proposition:
Proposition. $B$-module $X$ is naturally isomorphic to the $B$-module $\operatorname{Hom}(P, P \otimes_B X)$.
My first mind was to define a map $X \to \operatorname{Hom}(P, P \otimes_B X)$, $x\to\phi_x$, where $\phi_x: p \to [p \otimes x]$ (here $[a]$ is an equivalence class of element $a$ in the cokernel)... But I didn't prove anything: neither it's an epi- or mono-.
I also tried to say that
$\operatorname{Hom}(P, P \otimes_B X) \simeq P^* \otimes_B (P \otimes_B X) \simeq (P^* \otimes_B P) \otimes_B X \simeq B \otimes X \simeq X$.
Obviously this proof is wrong because
(i) $P^* \otimes_B P$ even doesn't make sense since $P^*$ is a right (not left) $B$-module;
(ii) I used that $P^* \otimes_B P$ is isomorphic to $B$ without proving it (my only motivation was the similarity of this fact with the well-known canonical isomorphism for finite-dimensional vector spaces: $V^* \otimes W \simeq \operatorname{Hom}(V, W)$). But I didn't use that $P$ is a projective module...
So my first question is: is this fact ($P^* \otimes_B P$ is isomorphic to $B$) true for any projective module (if we'll find a definition of $P^* \otimes_B P$?
And my second question is: could someone help me with proving the proposition (maybe without answering the first question)?
I'll also assume that $P$ is finitely generated as an $R$-module. In this case, the natural morphism $P^*\otimes A\to \hom_R(P,A)$ is an isomorphism for all $R$-modules $A$; where $P^* := \hom_R(P,R)$.
Indeed, this holds for $R^n$ for finite $n$, and $P$ is a direct summand of one of these : $P$ is finitely generated projective.
Let $X$ be a left-$B$-module, then $P\otimes_B X$ is a left $R$-module, and so we may consider $\hom_R(P,P\otimes_B X)$ which is a left-$B$-module (with $b\cdot f (p) = f(pb)$).
With all this cleared out we can prove the claim : $\hom_R(P,P\otimes_B X) \simeq P^*\otimes_R P\otimes_B X$ and this is a $B$-isomorphism. Now $P^*\otimes_R P = \mathrm{End}(P)$ and is isomorphic to $B$ as a $(B,B)$-bimodule.
Therefore $\hom_R(P,P\otimes_B X)\simeq P^*\otimes_R P\otimes_B X \simeq B\otimes_B X \simeq X$, and if you explicit those isomorphisms (the key is to let $\sum_i l_i\otimes v_i " = " id_P$ and not care about what the $l_i, v_i$ are) you'll see that in the $\leftarrow$ direction, it is indeed $x\mapsto (p\mapsto p\otimes_B x)$