Worked solution
Write down the cosine rule for a side
We know two sides and the angle trapped between them, so the cosine rule is the right tool. The side we want, a, sits opposite the known angle A.
Substitute the values you know
Swap each letter for its number. The two known sides go in the squared terms and the angle between them goes inside the cosine.
Work out the squares and the product
Square each length, and multiply 2, b and c together separately. Breaking it into pieces makes calculator slips less likely.
Evaluate the right-hand side
Make sure the calculator is in degree mode, find the cosine, then combine everything into a single number. This is a squared, not a yet.
Square-root to find the side
Because we found a squared, the last move is a square root. A length is always positive, so we keep only the positive value.
State the final answer
Rounding to 3 significant figures, side a is about 5.79 cm. It sits opposite the 40° angle, so it should be shorter than the longest side.