I could be mistaken, but I think that v1 in it's "native basis" of B' would be written just as [1 ; 0 ; 0] (a column vector). So when you left multiply v1 by the matrix P, what you get is u1. So u1 (expressed in the B' basis, ie as a linear combo of v1 v2 v2) is just the first column of P, [1; 0 ; 3]. Similarly, u2 = [-1; 1 ; 0] and u3 = [2 2 -1].

If you want to go the other way, just invert P. It is invertible.