Regarding the first question:
to change into
I think there will be a paragraph mark or line break on each and every line in your document. you can simply find and replace it.
Regarding the second question
<math>, <semantics> and
</math>, </semantics> tags
Similar to the first one, just find and replace it.
For these both options try to record the macro (Goto tools -> macro -> record new macro). so that you can learn better. there are so many options available in find and replace.
if you need more help please let me know.