Deriving values of $A$ and $\phi$ in $x = A\cos(\omega_0 t + \phi)$ I'm currently studying the textbook Fundamentals of Acoustics (2000) by Kinsler et al. Chapter 1.2 The Simple Oscillator says the following:

$$\dfrac{d^2 x}{dt^2} + \omega_0^2 x = 0 \tag{1.2.5}$$
This is an important linear differential equation whose general solution is well known and may be obtained by several methods.
One method is to assume a trial solution of the form
$$x = A_1 \cos(\gamma t) \tag{1.2.6}$$
Differentiation and substitution into (1.2.5) shows that this is a solution if $\gamma = \omega_0$. It may similarly be shown that
$$x = A_2 \sin(\omega_0 t) \tag{1.2.7}$$
is also a solution. The complete general solution is the sum of these two,
$$x = A_1 \cos(\omega_0 t) + A_2 \sin(\omega_0 t) \tag{1.2.8}$$
where $A_1$ and $A_2$ are arbitrary constants and the parameter $\omega_0$ is the natural angular frequency in radians per second (rad/s).

Chapter 1.3 Initial Conditions says the following:

If at time $t = 0$ the mass has an initial displacement $x_0$ and an initial speed $u_0$, then the arbitrary constants $A_1$ and $A_2$ are fixed by these initial conditions and the subsequent motion of the mass is completely determined. Direct substitution into (1.2.8) of $x = x_0$ at $t = 0$ will show that $A_1$ equals the initial displacement $x_0$.  Differentiation of (1.2.8) and substitution of the initial speed at $t = 0$ gives $u_0 = \omega_0 A_2$, and (1.2.8) becomes
$$x = x_0 \cos(\omega_0 t) + (u_0/\omega_0) \sin(\omega_0 t) \tag{1.3.1}$$
Another form of (1.2.8) may be obtained by letting $A_1 = A\cos(\phi)$ and $A_2 = -A\sin(\phi)$, where $A$ and $\phi$ are two new arbitrary constants. Substitution and simplification then gives
$$x = A\cos(\omega_0 t + \phi) \tag{1.3.2}$$
where $A$ is the amplitude of the motion and $\phi$ is the initial phase angle of the motion. The values of $A$ and $\phi$ are determined by the initial conditions and are
$$A = [x_0^2 + (u_0/\omega_0)^2]^{1/2} \ \ \ \ \ \ \text{and} \ \ \ \ \ \ \phi = \tan^{-1}(-u_0/\omega_0 x_0) \tag{1.3.3}$$

In trying to rederive 1.3.3, I get the following:
$$x = A\cos(\omega_0 t + \phi)$$
$$t = 0, \ x = x_0: \ \ \ x_0 = A \cos(\phi) \ \ \Rightarrow A = \dfrac{x_0}{\cos(\phi)}$$
$$\dfrac{dx}{dt} = -A \omega_0 \sin(\omega_0 t + \phi) = u_0$$
$$t = 0, \ A = \dfrac{x_0}{\cos(\phi)}: \ \ \ - A\omega_0 \sin(\phi) = u_0 = -x_0 \omega_0 \dfrac{\sin(\phi)}{\cos(\phi)} = -x_0 \omega_0 \tan(\phi) \ \ \Rightarrow \phi = \tan^{-1} \left( \dfrac{-u_0}{x_0 \omega_0} \right)$$
So although my results agree with $\phi = \tan^{-1}(-u_0/\omega_0 x_0)$ in 1.3.3, I got $A = \dfrac{x_0}{\cos(\phi)}$ instead of $A = [x_0^2 + (u_0/\omega_0)^2]^{1/2}$. Did I do something wrong here?

We will show that you have not done anything wrong by expressing $1^{\text{st}}$ of the two equations of 1.3.3 differently. Now, consider the $2^{\text{nd}}$ of the two equations of 1.3.3. We can write
$$\tan\left(\phi\right)= -\frac{u_0}{\omega_0 x_0}$$
If we square both sides of this equation, we get,
$$\tan^2\left(\phi\right)=\frac{u_0^2}{\omega_0 ^2 x_0^2} \tag{1}$$
We substitute (1) in the $1^{\text{st}}$ of the two equations of 1.3.3 and obtain,
$$A = \Big[x_0^2+x_0^2\tan^2\left(\phi\right)\Big]^{1/2} = x_0\Big[1+\tan^2\left(\phi\right)\Big]^{1/2} = x_0\sec\left(\phi\right) = \frac{x_0}{\cos\left(\phi\right)}$$
See, you have not done anything wrong. You have derived a different expression for $\pmb{A}$, which is as valid as the one given in the textbook.
