How can I extend this waste drain for new bathroom sink?
Caveat: I see now that your steel hub is very small, which is probably why things are set up as they are. My solution may not work. You may need to open the wall and enlarge the hub or replace a section of pipe with PVC and a sanitary tee.

My guess is that you have a threaded pipe hub there, into which the plastic trap component has simply been inserted. If that's the case:

Clean up the threads and extend with a threaded pipe nipple of the appropriate size, using thread compound as a sealant



Add a female PVC adapter for 1-1/2&quot; pipe



Install a pipe stub and a slip-joint adapter



Insert the outlet of your trap assembly into that fitting and snug up the compression nut