I'm really not sure I completely understand the situation you are describing, but it doesn't sound legal. It sounds like it could be considered fee splitting. Laws vary from state to state so I can't tell you for sure. I would be very concerned because if it is not legal someone definitely could have their license taken.
Michele