Let \[ f(x)= \begin{cases} A+2x, & \text{if } x<3,\\[4pt] 1+x^{2}, & \text{if } x\ge3. \end{cases} \] If the function \(f(x)\) is continuous at \(x=3\), then the value of \(A\) is: