MathJax in chat
You can find some information on MathJax in chat in the following posts from Mathematics meta:
I have changed the wording in the second bullet point since several users -
who probably have better knowledge of these issues than I do - mentioned in the comments that this should not cost additional resources on the server side.
More-or-less the same is explained in this older question on this meta: MathJax on Chat.
I can confirm from my experience in chat that many users use the bookmarklet linked above for this purpose. At the moment, the only room associated with MathOverflow which is really active is Homotopy Theory. Since I see that one of the above links is explicitly mentioned in the room topic, I suppose this bookmarklet (or some other similar script) is used in chat also by MO users.
Editing messages in chat
About your second question:
I tried to edit the chat messages after submitting but couldn't figure out how to do that either.
You have a short grace period when messages can still be edited. But you cannot edit older messages. (Moderators are exception to this rule.)
Quote from the chat FAQ:
If you make a mistake when entering a message, press the ↑ up arrow to edit your last message ... or press esc to cancel editing. You have 120 seconds to edit your messages. All edited messages have a small edit indicator.
The faq for chat contain several things which might be useful to know if somebody plans to use chat regularly.
Whether a chat message is edited or not, after you move your cursor on the message you can see a little downward arrow on the left. After clicking on this arrow, one of the options you can choose there is history. There you can see "the source" of the message - this is useful especially if you do not know how to make some kind of formatting but you see message by other user that contains what you want. For example, for this message the history looks like this. (It also illustrates that the moderators are exempt from rather short time limit when it is possible to edit chat messages.) This might be useful for users who is new to chat to learn how a formatting works. But also if you want to copy text (including the formatting) of some of your previous messages. (For example, if the message are no longer editable, but you still want to post also post a new version where the typos are corrected.)