|1) Is the box clean? I use clumping cat litter which is very comfortable for them and easy to keep clean. In fact, my alpha (3 pounds female) has her own litter tray which she will not share. I started her with that second nature brand of dog litter, but she really didn't like it. When I gave it some thought, it would be like a human walking barefoot on big tree branches, not comfortable. Once I switched to cat litter, she loved it, but she is still very fussy. If there are more than two pee pee clumps, she will go to it, look up at me as if to say "You want me to go in there? It's dirty!" Once I remove the clumps and smooth the surface, she happily hops in and does her business. My beta (5 pounds) was much easier to train, she did what her sister did, but she's less reliable about using her own litter tray, likes to keep me in sight all the time and seems to think that carpet hides all pee pee (sleeps in bed with me, litter tray two rooms away).
2) 9 weeks is very very young, most dogs no matter what breed don't consistently go only where they should until they are around 6 months old. Males are harder to train than females as a generalization. Getting him neutered will help with the 'marking'.
3) Is his bed near his litter box? Or, is his bed way too big? Chihuahuas are small, so a foot away from where they sleep is at the other end of the house for us. Dogs don't like to soil where they sleep, so something is going on with that.
4) Do you take him outside or to his box as soon as he wakes from a nap, before he eats, after he eats, after he plays, if it's been an hour since he last went? Put him in the box, tell him "Go Potty", take him out if he doesn't go after a few minutes, praise him to the heavens if he does go.
5) He cries in his cage. Well, so would you at first. You'll just have to put up with it for a few days, just like training a human infant to sleep alone in his/her own crib. When you are home and with him, he should be with you. Chihuahuas bond with "their humans", their whole existence revolves around making their humans happy. He should be sleeping in his cage, put his bed in the cage, and a few toys. Don't make a big deal about it, just tell him "night night" and that's that. It works especially well if they are nearly asleep anyway. I used my bathroom, tile floor, as a puppy-proof room. She had her bed, her litter box, her food and water dishes and a few toys. Messes were easy to clean up, soon she got used to going to "her room" when I went to work or to bed.
I suggest the book "Chihuahuas for Dummies", by far the best I have ever read on the care and training of these adoring creatures.