This metal p-trap in my kitchen has rusted out at the bottom and is leaking. I removed it and in this case the nut goes on the trap side and the piece it connects to is threaded. I'm used to seeing the opposite where the trap is threaded. All the traps I saw at HD were threaded as well so wasn't sure what to purchase to repair this.
You should be able to find a replacement pretty easily. I put "home depot p trap" into Google and came up with the following product in under a minute:
I believe this would work for your application. Where I am, they list it as available in-store, so you should have luck finding it in store. Otherwise, you could order it. The one in the image is specifically called "1-1/2 in. Plastic J-Bend."
To elaborate on what Hari said, it's important to note that the most common kind of trap is for a PVC to PVC (compression fitting with top-screw). You have a chrome pipe there, so you need a P-trap that is threaded with the screw below.
Something he didn't mention is that, with chrome, you have to have a rubber washer. If I were you, however, I'd go ahead and replace the chrome wall tube as well (you have a reducing cap behind it). Then you can buy a PVC kit that contains both the trap and the wall tube. This will require a washer for that nut, but once it's done you don't need to worry about it again. The reason to do this is the PVC removes more easily if you have a clog. If that washer on the chrome dries out, you'll have to replace it potentially any time you need to remove the trap.
Just wanted to add (for anyone else that comes across this like we did) that we have the exact same metal trap in our house and had to replace a leaking J-Bend that had rusted out as well. Bought the J-Bend that Hari posted at HD and it fit perfectly and formed a tight seal with a 1-1/4 in. washer (didn't seal at first with a 1-1/2 in. washer).