Your ideas are mostly correct, but can be simplified to be more elegant.

If and are both identity elements, then , where the left equality comes from being the identity, and the right equality comes from being the identity.

In this next one I assume is the inverse element of . Then

Suppose . Then