Concatenate display variable and regex the value in query

I have a requirement to display Host_name and IP_Address together in user selection dropdown, I am getting metrics like


I am able to concatenate the variable using label_join in Prometheus query
query_result(label_join((label_join(node_boot_time{job=“infra-nodes”}, “data_value”, " -[",“instance”, “ip_address”)), “joined_label”,"]",“data_value”,“a”))

Which gives me output as “cassy_1 -[]”

My Question:
I want to use this value in other graph query and the value is derived it is not working in other queries.

I tried creating 2 variables host_name and ip_address but unable to show it for user selection in template.