Since you will not tell anything about the cables from the ports on the two screens, and what ports they are plugged into (types, mostly) on the video card or computer, we have to assume they are identical and the cables can be swapped to different ports. That would make the 21 inch monitor #1 screen, and the 40 inch TV the #2 screen, as you need. If you cannot swap because of incorrect port types, you might buy adapters to change the types. A DVI and an HDMI are identical except no sound on the DVI. You can buy an audio breakout box for that. Some are bi-directional. You can buy an HDMI to VGA converter.
That is all that can be guessed from what you tell.