I'm a junior developer. In my first week back after time off due to some issues, my new manager reprimanded me because a senior dev team member complained to him that I was asking him questions about the application he built (I was asking where to find a piece of information because I don't know that application well and he's the expert on it). He says I should have been able to find this information myself (I also wasn't sure what exactly it looked like) and that I should not have asked both him and the senior dev because I was taking up both their time (the senior dev wasn't replying and it was urgent so I asked my new manager). I'm starting to feel like I get punished for asking questions. I was also reprimanded for asking a former team mate in another team for help on the last bit of a task I was stuck on, since he was knowledgeable about the app the task was for. I was told I was taking up his time that he could be spending on his own work, and that I should only ask questions or look for help within the team.
My previous manager voiced displeasure at me taking longer on some tasks. He told me that instead of spending hours stuck on a problem I should ask a team mate because "they can solve it in 5 minutes what takes me hours".
My new manager also reprimanded me for asking about a career plan this far into my employment (> 6 months). He says I need to gain respect from the team. He tells me that he doesn't see a willingness from me to grow past a junior developer and questioned my desire to continue developing and reach the next level (mid level dev). He says that I need to spend time outside of my work hours programming and learning by doing side projects etc. And that he will come up with a plan.
I complete my tasks. I didn't push back when being told all this. I only replied to him that his feeling that I wanted to stay as a junior developer was not the case.
From this point on, how should I respond to my new manager's feedback and put an end to his concerns?
I want to exceed his expectations.