
beilegen
to enclose
To add something to something else, especially to a letter or shipment.
Bitte legen Sie Ihrem Antrag eine Kopie Ihres Personalausweises bei.
Please enclose a copy of your ID card with your application.
to enclose / settle / heave to
Loading your saved state.

to enclose
To add something to something else, especially to a letter or shipment.
Bitte legen Sie Ihrem Antrag eine Kopie Ihres Personalausweises bei.
Please enclose a copy of your ID card with your application.

to settle
To end and resolve a dispute, conflict, or disagreement.
Die beiden Nachbarn konnten ihren Streit nach langer Zeit endlich beilegen.
After a long time, the two neighbors were finally able to settle their dispute.

to heave to
In seafaring, to greatly slow a ship down or bring it to a stop, often in strong wind or a storm.
Angesichts des aufziehenden Orkans befahl der Kapitän, das Schiff beizulegen.
In view of the approaching hurricane, the captain ordered the ship to heave to.
'Beilegen' (to enclose/settle/heave to) is a separable verb. The prefix 'bei-' comes at the end in a main clause; in subordinate clauses and in the infinitive, it stays attached to the verb. In the infinitive form with 'zu', 'zu' comes between the prefix and the verb.
Er legt dem Paket eine persönliche Notiz bei.
He encloses a personal note with the package.
When you enclose something with a document or shipment, that shipment is often in the dative. The enclosed object itself is in the accusative.
Dem Brief war ein Foto beigelegt.
A photo was enclosed with the letter.
In the meaning of 'schlichten' (to settle/mediate), 'beilegen' is almost always used with abstract nouns for conflicts. Typical combinations are: 'einen Streit beilegen' (to settle a dispute), 'einen Konflikt beilegen' (to settle a conflict), or 'eine Krise beilegen' (to settle a crisis).
Die Parteien versuchten, ihre Differenzen beizulegen.
The parties tried to settle their differences.
This meaning of 'beilegen' (to heave to) is technical language from seafaring. You can recognize it from words like 'Schiff' (ship), 'Kapitän' (captain), 'Segel' (sail), or 'Sturm' (storm) in the context.
Bei hohem Wellengang musste das Segelboot beilegen.
In heavy seas, the sailboat had to heave to.
to compare
In a legal dispute, both words can describe reaching a solution without further proceedings. „Sich vergleichen“ emphasizes an agreement between the parties involved, usually through a compromise; „beilegen“ focuses mainly on bringing the dispute to an end. „Sich vergleichen“ fits the agreement, while „beilegen“ fits the end of the conflict.

Mit dieser Zahlung konnten die beiden Parteien ihren Streit beilegen.
This payment enabled the two parties to settle their dispute.
Die beiden Parteien verglichen sich nach langen Verhandlungen auf eine Zahlung.
After lengthy negotiations, the two parties agreed on a payment.