I would rip out the whole thing and replace with new plastic pieces all the way from the wall to the new sink strainer basket. Part of the reason for this is that if part of it was corroded enough to break there is a real good chance that another part will be in similar condition.
The plastic parts for sink drains are very inexpensive and they will last a long time. In fact the typical big box home store will even sell kits of some of the parts that you need including the P-Trap. There will also be bins nearby that will have every other part that you could possibly need for your replacement. The plastic parts are also much easier to work with if they need adjustment or cutting to length. Many of the parts are designed to telescope with one another to allow adjustment without the need to cut to precise lengths.
Many of the joints in the plastic piping system use compression rings that the nuts squeeze around the outside of the adjoining pipe. These are often a fairly hard white/grey fake rubber or clear nylon material. I would encourage you to look around the area where the pipe parts are sold and purchase some alternate type compression rings that are made of a softer fake rubber material. (The ones I have purchased were red or blue in color). They cost a bit more but they make a far superior joint seal due to their flexibility and wedge shaped cross section.
I note that the existing P-Trap assembly is attached to the pipe in the wall via a rubber coupler that is secured into place with two screw type gear clamps. You will have to pay attention to this area as it may be necessary to provide suitable adaptation to the new piping system. In fact it may even be necessary to replace that rubber coupler if it is very old.
The first time you tackle a sink drain replacement you are sure to experience some frustration and say a few choice words. Especially as you bump your head in the cabinet as you go to back out. It is also not uncommon to have to make a second trip back to the big box home store to get additional parts, supplies or a tool. The experience will pay off however because the next time you have to look under a sink to make repairs you will have the needed confidence. And it is much less expensive than having a plumber come in to do the job.