This is called end-on-end, which is totally fine.
The illegal ones are those nested trips to avoid min-stay requirements. For example
AAA-BBB 1/1, MON
BBB-AAA 1/4, THU
AAA-BBB 1/8, MON
BBB-AAA 1/11 THU
Instead of buying expensive AAA-BBB r/t 1/1-1/4, 1/8-1/11 separately, one could buy 1/1-1/11, 1/4-1/8 and thus satisfies Saturday night stay requirement that the cheap AAA-BBB fare requires.
I was thinking of booking an itenarary that is like this:
AAA-BBB 3/10
BBB-CCC 3/10
CCC-BBB 3/17
BBB-AAA 3/17
Where AAA-BBB and BBB-CCC are round trips. Is this considered nested ticketing and against the fare rules? Booking AAA-CCC would cost $500 more.