Given vectors v = [5, −1], b1 = [1, 1], and b2 = [1, −1] all written in the standard basis, what is v in the basis defined by b1 ​and b2? Given vectors v= [5, −1], b1 = [1, 1], and b2 = [1, −1] all written in the standard basis, what is v in the basis defined by b1 ​and b2?
The solution is [2, 3], but I need to know how.

v in the same basis as b1 and b2 is [5,-1]
but if v has to be defined in terms of b1 and b2, then
vb = 2b1, 3b2 = [2, 3] because this vector v is now being shown with b1
and b2 as new basis vectors.

I understand b1, but get confused how projection b2 gets calculated the way it does.
The solution provided completed projection b2 as follows:

Proj. b2 = $\frac{v.b2}{|b2|^2}$ = $\frac{(5x1)+(-1x-1)}{-1^2 + (-1^2)}$ = $\frac{6}{2}$ = 3

How does b2 [1, -1] become [-1, -1] in the calculation?
And even still, shouldn't that equal -2, not 2? Giving answer -3, not 3?
I seem to calculate  1^2, + (-1^2) = 0, and arrive at 6/0, which obviously isn't right. Where am I going wrong?

*

*For the denominator, the -1 is a mistake. There should not be a negative sign in front of the 1. In fact the writer acts as if there is no negative sign there.


*You're going wrong because you're doing $1^2+-1^2=0$. You should instead be doing $1^2+(-1)^2=2$
For the numerator, $b_2$ has not become (-1,-1). It simply dots $b_2$ with v.
$$\begin{split}v\cdot b_2&=\left(\begin{matrix}5\\-1\end{matrix}\right)\cdot \left(\begin{matrix}1\\-1\end{matrix}\right)\\
&=5*1+-1*-1\\&=6\end{split}$$
The correct calculation without all these errors looks like
$$\begin{split}\frac{5*1+-1*-1}{1^2+(-1)^2}
&=\frac 6 2\\&=3\end{split}$$
