The splined piece snaps in same way on both ends.
They are a little challenging to pull apart, but with a little leverage they come right out.
Same going back in.. the c-clip is a bear.
Depending on the damage, it may still be usable.
Post a photo.
FYI: You MUST "FULLY SEAT" the CV-axle into the differential, or it will slide in/out and chew up everything.
It's quite a job "lining up" the axle so you can whack it extra hard and straight in.
I use bungies to support axle while whacking it in.
It MUST be seated fully.
Good luck
(this is one of my old axles.. turns out it wasn't bad, but I replaced it anyway)