There isn't documentation online anywhere, unfortunately... I think #p2#2 is a bug (most likely the browser will ignore the second hash symbol and everything that follows it).
The "id" parameter indicates which paragraph(s) or heading(s) to call out on the page with a bar in the left margin. You can get the IDs for paragraphs by looking for "id" attributes on the HTML elements in a web inspector. If the id parameter is left off, nothing will be called out on the page.
The "lang" parameter indicates which language of content to go to. If the lang parameter is left off, the link will open in the browser language (web) or current content language (app).
The "#" indicates where on the page to jump / scroll to, after it loads. Usually this is the first paragraph that's called out with a bar, but it doesn't necessarily have to be. If the # is left off, the page will load scrolled to the top.
The same URL pattern should work for all content under
https://www.churchofjesuschrist.org/study.