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?
 A: 
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?

Suppose $v = r\times b_1 + s\times b_2.$
Then, looking first at the 1st component of the vectors $b_1, b_2$ and $v$ and then looking at the 2nd component, you have:
$r(1) + s(1) = 5$ and 
$r(1) + s(-1) = -1.$
Two linear equations in two unknowns.  Solve for $r$ and $s$.
A: That's much too "sophisticated" for me!
To write v = [5, −1] in terms of b1 = [1, 1] and b2 = [1, −1] means to write [5, -1]= a[1, 1]+ b[1, -1].  We can write this as
[5, -1]= [a, a]+ [b, -b]= [a+ b, a- b].
So we want a+ b= 5 and a- b= -1.
Adding the two equation eliminates b: 2a= 4 so a= 2.
Then 2+ b= 5 so b= 3.
[5, -1]= 2[1, 1]+ 3[1, -1].
A: *

*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}$$
