To remove the track rod from the steering rack you need to hold the flats on the track rod, and undo the large nut underneath the track rod gaiter.
To remove the TRE from the track rod - there is flats on the track rod that you can put a spanner on to prevent spinning.
To remove the TRE from the wheel bearing housing, lever the top gently to undo the nut, then to remove from the wheel bearing housing, do not hit the threads upwards, just hit the side of the wheel bearing housing a few times with a heavy hammer.