How can I write chemical types of organic compounds and chemical reactions like the example of photography?
Short answer: you can’t. It’s possible to use Math to write simple chemical equations, but not the “extended” ones you need. Your choices are to either use Draw to “build by hand” the equation using graphical elements, or to use TexMaths extension together with the chemfig LaTeX package… but of course, for the second option you need to install LaTeX and learn how to use TexMaths, set chemfig…
There is also a LibO extension for writing chemical structures, but I don’t recommend it: it requires Internet connection and seems unmaintained.
Thank you.