This is a very common problem, which has two very common solutions.
Solution 1 can only be used if you have access to Side 1. Solution 2 should be used only when you cannot use Solution 1.
Solution 1: Move your trailer as close to the dock as you can. I mean less than a foot. Approach the dock from Side 1 in the opposite direction of your arrow. Lay your port side mid ship on the piling at the end of Side 2, assuming you have a piling. If you have no piling, maneuver close without touching the dock. Gently power around the dock, making sure to keep your rub rail on the piling. This will keep you from getting slammed into the dock. Once around, gently power up to your trailer. You may be able to power up from here, but it depends on depth of water, tide, make of trailer, etc. If necessary, get out of your boat and guide it onto your trailer far enough where you can power up. In open water with heavy seas, use Solution 2, otherwise your boat will be toast.
Solution 2: This solution takes a great deal of skill, but it is done all the time. Move your trailer farther from the dock. This will allow maneuvering room for a poor approach. Approach the dock just like the arrow in the first picture, keeping your boat as close to the end of your trailer as possible and stern to the wind. It is very easy to maneuver a boat with stern windward, far easier than bow windward. Adjust your bow so that it is just past the starboard trailer guide. Your boat should now be perpendicular to your trailer and a foot past the starboard guide. Using the starboard guide as a pivot, throttle your port engine forward and starboard engine back pivoting your boat to starboard. Before your boat aligns with the trailer, turn hard port and use only enough power on your port engine to move between your guides. Once your port side has drifted to the port guide, use both engines to align and power up. Depending on water depth and your draft, you may have to adjust these positions somewhat. Generally speaking, if you have outboards or stern drives you can usually obtain a perpendicular position. If you have inboards, you may have to approach at a slight angle. If you have another person on board, it is very helpful to have them loop a rope around the starboard guide to keep your bow centered.
Practice this in open water with a couple of buoys as guides. You will be surprised at how good you get in a very short period of time.
Remember! Never approach a dock any faster than you want to hit it.
Good luck.
Regards,
Drew