\(| A + B |=\sqrt{| A |^2+| B |^2+2 AB \cos \theta}\)
Now in the problem we've,
\(| A + B |=| A |+| B |\)
Squaring on both sides,
\(\begin{array}{l}| A + B |^2=(| A |+| B |)^2 \\| A |^2+| B |^2+2| A || B | \cos \theta=| A |^2+| B |^2+2| A || B | \\\Rightarrow \cos \theta=1\end{array}\)
assuming neither of the vectors are \(zero\) vectors.