Given two infinite sets $A$ and $B$, I'm asked to show that the two sets $\mathcal{P}(B)^A$ and $\mathcal{P}(A)^B$ are equipotent. I proved it by showing that those two sets have the same cardinality (${(2^{|B|})}^{|A|}$ and ${(2^{|A|})}^{|B|}$ respectively, which are both equal to $2^{|A||B|}$ under the laws of cardinal exponentiation [that's correct, right?]).
All is well, but I'm interested in proving the same claim by constructing a bijective function between those two sets instead, but I'm not sure how. Can it be proved this way?
Yes, it can be proved by showing an explicit bijection. Each step in the following sequence of equalities can be shown by a bijection, and it is easy to explain the composition of bijections.
$$\begin{align} \left|\mathcal{P}(B)^A\right| &=\left|\left(2^B\right)^A\right| \\[2 ex] &=\left|2^{B\times A}\right| \\[2 ex] &=\left|2^{A\times B}\right| \\[2 ex] &=\left|\left(2^A\right)^B\right| \\[2 ex] &=\left|\mathcal{P}(A)^B\right| \end{align}$$
Each of those steps has a standard bijection. Ask if you cannot continue from here.