For the space with the copper pipe you could use a thin piece of pine or hemlock trim material that is typically called a lattice moulding. The type I am thinking of is 1/2" thick and 2 1/2" wide. Before installing you would want to patch up, sand, prime and paint the drywall material. Then nail the lattice strip into place and prime and paint it. When I install such material I will typically prime on all sides and paint it even before installation. A pneumatic brad nailer is an excellent tool for installing such moulding using 16ga slight head brad nails that are 2 1/4" long. Use extreme care not to nail into that copper pipe of any electrical wiring in the wall.
The repair of the part of the baseboard in the doorway can be a bit more problematic. I see two possible ways to deal with this.
The first method would involve removing the existing base board in both directions back from that corner. Then install new matching baseboard that comes all the way to the corner. The moulding from each side would meet right at the corner with an outside corner miter joint.
The second method would involve cutting back the baseboard that currently comes right to the corner by an equal amount that the base board on the left side of the picture is shy of the corner. Then you would fit 3/4" pine corner boards that fill in both sides and meet in the corner with an outside corner miter. This corner block would want to be just a small bit higher than the existing molding.