The $x$ component of vector $A$ is 25.0 m and the $y$ component is 40.0 m.

(a) What is the magnitude of $A$?

(b) What is the angle between the direction of $A$ and the positive direction of x?

For (b) I tried using the formula $\tan \theta = \frac{a_y}{a_x} = \frac{40}{-25} = -1.6$, thus $\arctan(-1.6)=58$ degrees which does not match the answer key: $122$ degrees.

Any help is appreciated.

Your result of 58 degrees is nevertheless correct. The answer key is incorrect, as a sketch confirms : the angle should be less than 90 degees.