Try to run this from packageB dir:
"cabal sandbox add-source {path to C}"

Then install packageA from B

Also maybe try to run
"cabal install packageC"
from packageB - this may not be necessary.

Btw separate sandboxes - one per each project - work just fine.