How should I do when two package be dependent on each other?

In reply to designer007:

You cannot have circular dependencies between two different classes in two different packages. The classes need to be in the same package, or you need to figure out a way to break the circular dependencies. See the https://xyproblem.info.