There are a few basic things you should keep in mind when writing a formal letter:
-Address the letter to the proper recipient. If you do not know the name of the person you are writing to, you can use a general title such as "To Whom it May Concern."
-Open the letter with a proper salutation. Again, if you do not know the name of the recipient you can use a general title such as "Dear Sir or Madam."
-The body of the letter should be clear and concise. Get to the point quickly and do not use unnecessary words.
-Close the letter with a proper closer such as "Sincerely" or "Respectfully."
-Be sure to sign the letter.
You can find a more detailed explanation of how to write a formal letter here:
https://www.thebalancecareers.com/how-to-write-a-formal-letter-2059333