You can use gparted to delete partitions of Ubuntu 24 and extend Ubuntu 22 partitions. Do you have any problem with this solution?