Short answer: it depends on your definitions, and these questions risk missing the point; most accusations of sexism and racism against women and non-white people are spurious. Longer answer:
What do 'sexism' and 'racism' mean?
These words mean different things to different people. I'm going to start by doing something which I know annoys people in arguments about politics, and refer to dictionary definitions. I'm certainly not suggesting this settles the argument, but what dictionaries try to do is to reflect the most widely understood meanings of words; if you want to use words in other senses, you may find you need to spell it out in order to avoid misunderstandings. So here's Chambers on sexism and racism:
sexism noun contempt shown for or discrimination against a particular sex, usually by men of women, based on prejudice or stereotype.
racism noun 1 hatred, rivalry or bad feeling between races. 2 belief in the inherent superiority of a particular race or races over others, usually with the implication of a right to be dominant. 3 discriminatory treatment based on such a belief.
By these definitions, obviously women can be sexist against men and black people can be racist against white people. I learned something like these definitions at school, and my sense is that this is still how a great many people understand the terms. Perhaps these are simplistic, though, and we may want to make a case for a definition reflecting a more nuanced understanding of these concepts. Many feminists and people involved in race politics prefer to formulate sexism and racism in terms of 'prejudice plus power'. There is, after all, a huge difference between someone in a position of power using their power against one group of people, and someone with very little power complaining about their treatment by another group. Prejudice is mostly relevant only in proportion to the power it's backed up by. Without power, it's not oppression, and if it isn't oppression, is it really that important?
So there is a case for thinking about power whenever we think about racism and sexism. There is a whole system of power dynamics that favours white people, and another that favours men. The former is usually referred to as 'white supremacy', and the latter is 'patriarchy'. Viewed through this lens, the racism experienced by non-whites is one aspect of white supremacy, and the sexism experienced by women is a manifestation of the patriarchy. When white people experience discrimination based on their skin colour, in a white-dominated society, that is an aberration, and it doesn't come backed up by a mass of institutional power. Brown-skinned people are far more likely to experience discrimination routinely, and from people in positions of relative power. The discrimination that men experience based on their perceived gender is in many respects milder, less pervasive and less disempowering than the sexism experienced by women.
All of this should give us pause when accusations of sexism or racism are made against women and non-whites. Someone complaining of sexism when feminists exclude men from safe spaces or debates, or of racism when people involved in race politics ask white people to pipe down about it, is missing the point that people other than white men are excluded from conversations and positions of power routinely, often unconsciously. The default state in white-dominated countries is that white men are the ones who do most of the talking, especially talking over people and telling people what to do. It happens so much on gendered lines that when a conversation between people of different genders isn't dominated by male voices, most of us feel like something is wrong. As long as that's true, trying to carve out spaces where that isn't the case is not really sexist, or racist. It's just taking back a little bit of power and autonomy.
So there's a strong case for a more nuanced understanding of sexism and racism than traditional definitions will give us. It doesn't follow that a good way to win arguments is to tell people that their definition is wrong, and they need to get with the times and use your newer definition instead, but we do need to talk seriously about the role of power dynamics in discrimination and oppression.
The complexity of power dynamics
Power dynamics are complicated. If you've met the idea of intersectionality, you'll be aware of this — oppression and domination occur on multiple axes. It follows that members of privileged groups don't always have the advantage over members of less privileged groups. Women as a group may be relatively powerless compared to men, but that's not always the case on an individual level. A trivial example would be that a gay, black, disabled working class man usually has less institutional and societal power than a straight, white, abled bourgeouis woman. White people as a group wield most of the power in Europe and North America, but there are plenty of cases where on a personal level, there is a power imbalance against particular white people. This is not just about groups, and it's important to remember that sterotyping, or seeing people in terms of group identity, is a big part of where racism and sexism come from in the first place.
Power dynamics are situational. What do you call it when a mother with a small child is harassed out of a public playground for being the only white people there, or a white kid in an overwhelmingly black school is repeatedly beaten up and called a honky? What do you call it when white people in minority-white countries are stereotyped and abused by people in positions of authority, based on their skin colour? What do you call it when women hold a man in contempt because he doesn't conform with stereotypes of masculinity? Isn't the patriarchy regularly reinforced by women and girls telling men and boys to swallow their pain and act out their anger? Even if we were to agree these do not count as examples of racism and sexism, would that imply that they're okay? Either way, what else are we supposed to call them?
It is possible to talk about these things in other terms: we can talk about prejudice, discrimination and bullying based on gender or race without bringing sexism or racism into it. 'That isn't racism or sexism' feels like a dismissal, though, and I think it's usually intended that way. The newer definitions of these terms are specifically intended to discourage people from seeing discrimination as being the same whether it's directed against the powerful or the powerless. This is a sensible and important goal, but I have two big worries. First, blanket statements like 'there is no such thing as racism against white people' gloss over situations where white people really do have less power than others, and really do suffer based on race. Yes, white people have the huge advantage of being able to leave pretty much any situation and walk into one where their race is no longer an impediment, but that doesn't erase the existence of times when it is. Second, the strategy of pushing new and improved definitions of words risks running up against people who are used to another definition, and may suspect that you prefer your one largely because it is convenient for you. It's easy to lose someone at the first hurdle if the conversation is reduced to one person's definition against another.
The world is huge and messy, and we are all held back by the difficulty of seeing things from other points of view. I was raised as a white guy in north London, and I know that by writing about these things at all I risk annoying or undermining people with far more of a stake in this than me. I hope I haven't done that, and that by sharing my perspective, I can help a few people to see another side of these things.
This writeup also appears on medium.