While it's difficult to assess accurately on the information provided, my first guess is a shift fork has either worn out and jumped or has broken. The transmission locking up leads me to believe something fell down into the gear cluster and jammed the transmission (probably a broken piece of fork). The fact that you could shift into some gears (fork still intact) but not others (fork broken) would make sense. I would remove the transmission cover (with the stick shift), lifting straight up if possible and make note of the shift fork placements (you will see where they fit on the gear shafts just by looking). Another possibility is a broken shaft, but it makes less sense with you simply backing off a trailer. Manual transmissions are straight forward and easy to understand, but you should not attempt repairs without a service manual if you need to disassemble the transmission. With a service manual and good tools, it should be no problem if you like mechanical things. My immediate thought is that by simply removing the cover, you will find a broken shift fork and repair is simple - get a new fork, place it back in exactly the same place with the same orientation, using the same dimple (on the shaft) from the original locking screw.