Dividends with one of the tokens in one LP pair

Hello guys.
I need advice about can i do it with solidity and pcs or not? Coz its seems like we cant swap like this.
Question about most popular dividend contracts all the same contracts uses(baby cake for example)
All this contracts logics uses swaps to: WBNB -> dividend token.
Any idea/examples how to do disturbe dividends in one token to holders of another token exists in one LP pair? Without WBNB swaps.

Basically if we have first token/second token pair, and want to distribute dividends in second token to holder of first token, how we can do it?