So, as several other answers indicate, Part-3 should just pull out unless glued.
Unfortunately for you, if it is glued then you have a bit of a problem because Part-1 is half of a trap and the other half looks like it is glued to the drain line coming out of the wall. Those traps often have a proprietary thread on the union nut so it is often difficult to replace just half of that type of trap. This makes it more complicated than some answers make it seem.
If you take your half of a trap to a plumbing shop and the union nut happens to fit a new trap at the shop, you are lucky and can replace parts-1, 2, and 3. If you can't find a compatible trap then you will need to replace Parts-1, 2, 3, and 4 (4 would be the other half of the trap), which requires cutting off Part- 4 (which leads to the pipe in the wall being too short, which leads to... frustration).
I hope you can get Part-3 to pull out.