How to get Algorithm complexty based on another 2 algorithms? I had quiz last week and it says: suppose algorithms $A_1$ and $A_2$ have worst-case time bound $p$ and $q$, respectively.
Suppose algorithm $A_3$ consists of applying $A_2$ to the output of $A_1$. (The input for $A_3$ is the input for $A_1$.)
Give a worst-case time bound for $A_3$.

How could I calculate the worst case based on the given info?
The total running time of $_3$ will be bounded by $()+()$ where $$ is the size of the input to $_1 $and $$ is the size of the output of $1$. Now time complexity is usually written in terms of the size of the input of the algorithm and nothing else, so if $=()$ then the running time of $_3$ will be $\mathcal{O}(p(x)+q(f(x)))$