“this one twists out” – it locks the front lens. Leave it as it was. Try to avoid sliding and rotating the front lens. Some people use fridge or smartphone vibration to settle the lens down, then tighten collar. Don’t use any force. If you get terrible lack of sharpness – it means the front element is a bit off.
The branded collar and the filter thread should be one piece, I can’t believe you ever rotated them separately (I can be absolutely wrong, naturally). But this part does nothing about focusing.
“bottom of this collides with the top of this” – yes, at this position the lens is focused to the infinity or even behind it.
So now you have 6 (or something alike) variants to screw these parts together. Screw it in to the end, screw a bit back as you need to set the synching thumb to its place (on the photo). Then check the focus with the camera (don’t rotate the ring while mounting, just check whether it’s infinity or not). When you find the lucky position and focusing works from end to the end – it’s time to look at the distance scale.
Does it show the wrong numbers? If so, find some small screws in it, release them. Rotate the scale to the correct position and fix it. If so, you are done.