Hi, does anyone know if there is/what the general formula for the addition of vectors is?

In particular, I'm trying to work out the problem: Two vectors and have precisely equal magnitudes. In order for the magnitude of + to be larger than the magnitude of - by the factorn, what must be the angle between them?

A friend offered the formula: sum^2 = a^2 + a^2 + a^2cos(t)

diff^2 = a^2 + a^2 - a^2cos(t)

However, I've never seen these formulas before and I don't understand the premise behind them so cannot determine if they are correct...

Can someone please help explain these formulas? Or offer another method of solving this problem?

Thank you!