Answer
$$
P^{-1}=\left[ \begin {array}{cccc} \frac{3}{2}&-2\\ -\frac{1}{2}&1
\end {array} \right]
.$$
Work Step by Step
Given
$$
B=\{(1,0),(0,1)\}, B^{\prime}=\{(2,4),(1,3)\}
.$$
To find the transition matrix from $B$ to $B^{\prime}$, we form the matrix
$$
\left[B^{\prime} B\right]=\left[ \begin {array}{cccc} 2&4&1&0\\ 1&3&0&1
\end {array} \right]
.$$
Using Gauss-Jordan elimination, the reduced row echelon form is
$$
\left[\begin{array}{ll}{I_{2}} & {P^{-1}}\end{array}\right]=\left[ \begin {array}{cccc} 1&0&\frac{3}{2}&-2\\ 0&1&-\frac{1}{2}&1
\end {array} \right]
.$$
So, you have
$$
Given
$$
B=\{(1,0),(0,1)\}, B^{\prime}=\{(2,4),(1,3)\}
.$$
To find the transition matrix from $B$ to $B^{\prime}$, we form the matrix
$$
\left[B^{\prime} B\right]=\left[ \begin {array}{cccc} 2&4&1&0\\ 1&3&0&1
\end {array} \right]
.$$
Using Gauss-Jordan elimination, the reduced row echelon form is
$$
\left[\begin{array}{ll}{I_{2}} & {P^{-1}}\end{array}\right]=\left[ \begin {array}{cccc} 1&0&\frac{3}{2}&-2\\ 0&1&-\frac{1}{2}&1
\end {array} \right]
.$$
So, you have
$$
P^{-1}=\left[ \begin {array}{cccc} \frac{3}{2}&-2\\ -\frac{1}{2}&1
\end {array} \right]
.$$