Instead of setting coordinates, it is better to use the point product (inner product) definition of vectors directly after the brackets are opened.
That is, modulus times modulus times cosine of angle.
After the question is opened, there is (it is not easy to type vector form)
ab-ca-cb+c^2=0
Get b = 0 from the vertical direction of a b.
So the original formula
|c||a|cosx+|c||b|cosy=|c|^2
Because a b is vertical, the angle x y satisfies x+y=90 degrees.
Then there is a vector, cosy=sinx, and c is non-zero.
So the original formula becomes |a|cosx+|b|sinx=|c|
Use the auxiliary angle formula (specifically, I forgot that the formula coefficient converted into a simple trigonometric function is A 2+B 2 under the root sign) because we want to take the maximum value of |c|.
Take the value of sin as 1.
You have (4+| b | 2) 1/2 = root number 5.
The square of both sides is 4+| b | 2 = 5.
When solving |c|= root number 5 |b|= 1