There are two different connections that you're dealing with. The tailpiece from the sink into the p-trap (the connection at #1) is called a slip joint. The connection at #2 is made with a union (and sometimes with a gasket).
I'm not aware of a fitting that would work for you but maybe by looking at this hereplumbing supplier's website you might find what you are looking for or a least the terms for that you need.