Pubblicare post su Mastodon

On the Federation tab of the user profile page, there is a configuration to add Linked Actors with an option for type Discourse or Mastodon. It says:

Posts associated with a linked actor will be attributed to your account.

How does this work? If I add a Mastodon account here, will my Mastodon posts end up on Discourse or is it the other way around? If the former, how are tags and categories selected? If I add a Discourse account here, posts from the external server will be added to the one on which this has been configured? Again, what if the categories and tags are not consistent?

I am hosting both Discourse and Mastodon, and I also have an account on this Discourse instance. I imagine the best configuration for me would be to have a post on either Discourse instance appear on both servers and be shared once on Mastodon. How this would be configured would depend on the answer to the previous question.

Also, what about replying to posts on ActivityPub? Can I use Mastodon to reply to a post from a linked actor for categories, tags, and users?