As you can see, the top picture shows the AI taking over a robot and creating big robo-arms as a replacement. The bottom picture is about the AI sending nanites to create a microchip and other hardware parts within a door, leading the AI to inhabit and to open/close it. I just want to verify if there is a possibility for an AI to use nanotechnology to modify robots and doors.
You are intelligent. Whether you are naturally intelligent or artificially intelligent I don't know and cannot know because we are communicating over the internet. Are you able to take control of nanites in order to create robotic arms and manipulate matter to open and close doors? If you cannot do so, then consider why and try to determine what you would need in order to gain this capability.
Seems to me there are several considerations that need to be addressed in order for an AI to be able to use nanites in the manner you suggest.
Can AI effectively communicate and interface with nanites over an air-gap distance? Be it Wi-Fi, Bluetooth, NFC, radio, etc; the AI in its superprocessor shell has to be able to control the nanites in real time. I suppose a long chain of physically connected nanites could transmit information.
Can nanites transmit back information about their surroundings? If a group of nanites heads into a door lock, can they map it out and transmit that info back to the AI can tell them how to open it? This is a non-trivial task, especially if they are trying to hack into circuit boards and small physical spaces that don't have easy access. The AI is going to be controlling the nanites on the fly, so it will need lots of information back from them as well.
Can the nanites form large macro-shapes like arms or levers? Most designs for nanites I've seen do have some capability of link together and push/pull, so with sufficient organization they could replicate a limb or move physical objects, but then you would need some pretty advanced sensory transmission to both replicate the function of an arm as well as all the feedback and control mechanisms in order to use it effectively. Lots of bandwidth, especially if it is being transmitted wirelessly.
Is there a counter-nanite system? In a world where AI controlled nanites are a thing, I imagine robots and security systems would incorporate either defensive nanites of their own, or at least devices to hinder remote control of nanites in their vicinity.
Answer these and I think an AI very well could affect its environment in the way you suggest.
Here's the thing about intelligence in general, all of us learn, it's how we cope with challenges and problems, and how we adapt and gradually gain skills. Usually, the human brain does this by making synaptic connections to otherwise not so much used parts of the brain, along with just storing the information for use later.
control the robot
The difference between an artificial intelligence and a natural or "human" intelligence is that the artificial intelligence can make these synaptic connections in microseconds and so can learn much, much faster than any human could. So if it would like to learn how to control robots, all it has to do is run a web query or even just experiment with taking control, it would be clumsy at first (like a kid trying to ride a bike) but then eventually it would learn how to do it effectively (like an adult riding a bike).
Open the door
As for opening the door, the same applies, if it is an electronically controlled door the A.I. can use that same method of experimentation to get it to open. Authors often use this character development cycle called the try-fail cycle and even if the character fails the first few attempts, he's learning and developing enough that after the third or fourth try he figures it out and now has a new skill.