Then number of ways of arranging the letters of word ALGEBRA in which either vowels or consonants but not both appear in alphabetical order The number of ways of arranging the letters of word ALGEBRA in which either vowels or consonants but not both appear in alphabetical order
My attempt:
Let $A$ is number of ways in which consonants are in alphabetical order i.e., $\dfrac{7!}{4!\cdot 2!}=105$.
Let $B$ is number of ways in which vowels are in alphabetical order i.e., $\dfrac{7!}{3!}=840$
Let $C$ is number of ways in which both vowels and consonants are in alphabetical order i.e., $\dfrac{7!}{4!\cdot 3!}=35$
So obtained answer by me is $105+840-35=910$
But given answer is $943$.
I want to know where am I going wrong.
 A: The number of different words we can form with the letters $A,L,G,E,B,R,A$ are $\frac{7!}{2!}$ which gives
\begin{align*}
\frac{7!}{2!}\cdot\frac{1}{4!}\color{blue}{=105}\tag{1}
\end{align*}
words with consonants $\color{blue}{B,G,L,R}$ in alphabetical order and
\begin{align*}
\frac{7!}{2!}\cdot\frac{1}{3}\color{blue}{=840}\tag{2}
\end{align*}
words with vowels $\color{blue}{A,A,E}$ in alphabetical order in accordance with OPs calculation. We want to calculate the number of valid words which have either consonants or vowels but not both in alphabetical order.

There are
\begin{align*}
 \frac{7!}{2!}\cdot\frac{1}{4!3}\color{blue}{=35}
 \end{align*}
different words which have both consonants and vowels in alphabetical order. We have to subtract this number from (1) but also from (2) since these words are counted in both calculations.
We conclude there is a total of
\begin{align*}
105+840-2\cdot 35\color{blue}{=875}
\end{align*}
valid words in accordance with a comment of @BenGrossmann.

Note: I've also verified this result with a piece of R code as additional plausibility check.
A: not $A+B-C$, but $A+B-C-C$ ,
$A+B-C$ counts $\#(A\cup B)$ Union (set theory)
$A+B-C-C$ counts $\#(A \ominus B)$ Symmetric difference

Assuming permutations here  dont' admit repeation, e.g. $A_1LGEBRA_2$ and $A_2LGEBRA_1$ just count once.
I wrote Mathematica code to count
list = Permutations[Characters@"ALGEBRA"]


list // Cases[#, {___, "A", ___, "A", ___, "E", ___}] & // 
  DeleteCases[#, {___, "B", ___, "G", ___, "L", ___, 
     "R", ___}] & // Length
(*vowels in alphabetical order,but consonants not, count 805*)


list // DeleteCases[#, {___, "A", ___, "A", ___, "E", ___}] & // 
  Cases[#, {___, "B", ___, "G", ___, "L", ___, "R", ___}] & // Length
(*consonants in alphabetical order,but vowels not, count 70*)


so the answer to your question is $805+70=\color{red}{875}$
