What's the right nvidia driver to support both Geforce 3080Ti and Tesla P40 on my Ubuntu 22.04?

You can’t use the -open kernel modules since the Pascal based P40 is not supported.