To solve your problem to ensure proper functioning of your display on Ubuntu 20.04, you need to install correct drivers for your NVIDIA T400 mobile graphics card. Follow below steps to do so:
- Open the Terminal on your Ubuntu. 
- Add the graphics drivers PPA by running the following command: - sudo add-apt-repository ppa:graphics-drivers/ppa
 
- Update the package list by running the following command:- sudo apt update
 
- Search for available drivers by running the following command: - ubuntu-drivers devices
 
- Install the recommended driver version for your graphics card by running the following command: - sudo apt install nvidia-driver-<version>
 
Note: Replace  with the version number recommended by the previous step.
- Reboot your system to apply the changes by running the following command: sudo reboot
After rebooting, check if both monitors are working properly. If you still face issues, you may try disabling the NVIDIA graphics card and use the integrated graphics instead. To do so, follow these steps:
- Open the Terminal and create a file named xorg.conf by running the following command: - sudo nano /etc/X11/xorg.conf
 
- Paste the following configuration in the file:
-  Section "Device" Identifier "intel" Driver "modesetting" Option "AccelMethod" "None" EndSection
 
- Save the file by pressing Ctrl+O, and then exit by pressing Ctrl+X. 
- Reboot your system by running the following command: - sudo reboot
 
After rebooting, check if both monitors are working properly. If yes, then your NVIDIA graphics card was the culprit, and you may need to update or replace it to fix the issue permanently.