Investigation of the thermal transport in superconducting niobium and tantalum