I want the coefficients to be in basis B, not E. So I guess the solution provided above does that, since inputting [1 0 0]' (using B basis, this is u) gives me back [0 2 0] (which is 2v in B basis).
The question was: "Find the matrix D in the B coordinate system". Unfortunately it does not...