Hi,
I think your a little confused about what you bought. If they were packed in black dirt they are earthworms and placing them in you backyard in not a bad idea but they will be long gone for your next trip.
If they were packed in seaweed from the tackle store, you have either bloodworms or sandworms. Bloodworms are thinner and have a nasty head with a pincher which shoots out at you when it feel threatened.
Sandworms are thicker, darker and have multiple very small fleshy legs(?) along the sides. They also have a pincher which comes out of the head area.
If they were packed with seaweed, burying them in your backyard was the wrong thing to do. That will kill them. They live in the intertidal zone of beaches.
Capt. Marc