It is imperative to replace the dryer.
The blocks at the ends of the line are part of the line.I can't really figure out what is going on in your pic, and it's 30° and snowing, or I'd go look at mine. But the line has a block at either end, each with a bolt and a nipple. The nipple goes into a hole like you see on the dryer and the bolt holds it on. The same thing will happen at the other end, too.
Here is what your missing part looks like. If the pipe is broken off and left the connection block on the condenser, you will have to remove it so you have a hole just like on the dryer end.
https://parts.conicellitoyotaofspringfield.com/oem-parts/toyota-ac-line-8872635020
Each nipple needs a new O-ring installed so it seals (in case you get one from a junk yard).
The system would probably best be flushed and cleaned, then the air completely removed by a vacuum pump and recharged with R-134a refrigerant and the appropriate amount of PAG-46 oil. Probably best done by a shop that specializes in this. It took me a while to learn to do basic AC stuff.