You mentioned having a 3 way switch for the pantry. Is there actually a second switch somewhere that is also supposed to control the pantry light, or did someone just throw in a 3 way switch in a situation where a normal, single pole switch would have worked? How many screws are present on the switch that controls your fan and fan light, not counting the green grounding screw?
Where does the power enter this circuit? It could enter the box with the double light switch, the box for the pantry light switch, the box the fan is mounted on, or the box that the pantry light is mounted on.
Helping you rewire this mess to work properly is going to require detailed information about exactly what wires are present in each location. There are several "right" ways to do the wiring in this situation, and picking the RIGHT "right" way for you will depend upon what wires are already present.
I'm going to go out on a limb with one possible answer to your question. Just keep in mind that it's only a guess since I don't have all of the information needed to know for sure.
You know how a duplex receptacle has 2 sets of connections on it, and you can run power in to the top two screws and out through the bottom two screws and on to the next outlet, right? Well, it may be possible that some very inexperienced person in the past saw a 3 or 4 way light switch and thought they could do the same thing. If they tried to daisy chain the power between light switches the way you would do it between receptacles, and they chose just the right (or, in this case, WRONG) way to attempt it, it could lead to your current situation.
In any case, the situation needs to be fixed sooner rather than later. The fact that your lights are functioning this way indicates that whoever did the electrical work had absolutely no idea what he was doing, and he VERY likely created unsafe conditions in your home. If you aren't up to making a diagram of the current wiring configuration for us to look at here, then you really, really need to get an electrician in to sort out your problems before your house burns down or someone gets electrocuted.
First, be clear on how 3-way circuits work. Now it's really hard to be clear in a diagram or junction box full of Egyptian spaghetti (red white black green). So we'll fix that -- thusly.
Here is a basic 3-way diagram. Now this doesn't tell you anything that jsotola's diagram doesn't, except for one thing -- we are adding color to designate wire function.
Black and white are hot and neutral, of course. Red is a traditional/common color for switched-hot.
The two travelers are different, but interchangeable, so they can be the same color without harm - in this case yellow. Feel free to use purple or blue if you prefer, just as long as it's unlike anything else in the box.
You can't buy /3 cable in yellow-yellow-white. So we end up using the stock black white red. And I say re-mark wires using colored tape to designate function.
Based on OP's description and comments, it sounds like there are two /3 cables and two /2 cables coming into a junction box like this:
Here I show the usual black-white-red cable colors, but I also "use tape" to re-mark them by function. Boy, this makes a big difference in clarity. This particular box didn't have a big problem with mixed colors, but some do.
Note that by OP's convention, the native-black wire is the one on the "common" (black screw) of the 3-way.
Now, if it's not working, it sounds like your travelers are not set up correctly. I have a feeling you have them crossed with something else, e.g. At a 3-way for a wire meant for a common terminal.
Tip on 3-ways: look at screw colors. The location of the common vs. other screws is completely random. I have held two 3-ways from the same manufacturer in my hand and one of them, the common is upper left, the other, lower left. WTH? I've been tempted to try to collect all 12 combinations!
Best Answer
Sounds like you might be out of luck, unless there happens to be a neutral in the box. When it comes to 3-way circuits, a white wire is likely not a neutral (and in your case I can say pretty certainly that it is not).
A 3-way switch has four terminals, none of which is neutral (unless it's a "smart" switch).
Common
This terminal is either connected to the line (power feeding in), or the load (feeding power to the device).
Traveller
There are two traveller terminals, which the switch selects between depending on the position. If power is fed to the common terminal, power will be directed to one of the travellers depending on the switch position.
Ground
This terminal provides a connection to the grounding conductor.