You have said that 3 times, i get it, that is what my expression does.
Now if you can show the payload you feed and what exactly you pasted in the change node, we could figure out why it is not working for you, as the below example works.
[{"id":"80f3a3ecc746e5e6","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2a00:60:b02d:1a04:11:32ff:fd48:eb43","payloadType":"str","x":250,"y":100,"wires":[["80898fe14df9b252"]]},{"id":"80898fe14df9b252","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$trim(\t $join(\t $split($$.payload, \":\")[[-8..-5]]\t , \":\"\t )\t) ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":80,"wires":[["27b0461078c8496e"]]},{"id":"27b0461078c8496e","type":"debug","z":"452103ea51141731","name":"debug 91","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":680,"y":80,"wires":[]}]
If you don't need to add the aaaa:bbbbb:....
delete the & "aaaa:bbbb..."
[edit] Here is how to get all with one expression.
[{"id":"80898fe14df9b252","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"($bits := $split($$.payload, \":\").$trim();\t{\t \"original\": $join($bits[[-8..-1]], \":\"),\t \"prefix\": $join($bits[[-8..-5]], \":\"),\t \"static\": $join($bits[[-8..-5]], \":\") & \":aaaa:bbbb:cccc:dddd\",\t \"static_var\": $join($bits[[-8..-5]], \":\") & $$.topic\t}\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":80,"wires":[["27b0461078c8496e"]]},{"id":"80f3a3ecc746e5e6","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":":dddd:cccc:bbbb:aaaa","payload":"Server:\t\t127.0.0.1 Address:\t127.0.0.1#53 Non-authoritative answer: Name:\tmydomain.dynv6.net Address: 2a00:6020:b02d:1a04:11:32ff:fd48:eb43","payloadType":"str","x":250,"y":100,"wires":[["80898fe14df9b252"]]},{"id":"27b0461078c8496e","type":"debug","z":"452103ea51141731","name":"debug 91","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":680,"y":80,"wires":[]}]