Attempt:
Let $x_{INi}$ be the number of people who travel from Ithaca to Newark in class $i$ where $i=1,2,3$ where each number represents class Y,B, and M, respectively, by simplicity. Similarly, write $x_{NBi}$ and $x_{IBi}$. Our goal is to maximize
$$ z = 300x_{IN1}+220x_{IN2}+100x_{IN3} + 160 x_{NB1} + 130 x_{NB2} + 80 x_{NB3} + 360x_{IB1} + 280 x_{IB2} + 140 x_{IB3} $$
Now, let us focus on the constraints. First of all,
$$ \sum_{i=1}^3 (x_{INi}+x_{NBi}+x_{IBi}) \leq 30 $$
moreover, we must have
$$ 4x_{IN1}+8 x_{IN2} + 22 x_{IN3} \leq 34 $$
$$ 8 x_{NB1} + 13 x_{NB2} + 20 x_{NB3} \leq 41 $$
$$ 3 x_{IB1} + 10 x_{IB2} + 18 x_{IB3} \leq 31 $$
and finally, all the $x's$ must be positive.
Is this a correct formulation?

The following constraints must be respected.
What you know is that:
Therefore, $X_{IN} + X_{IB} \le 30$ and $X_{IB} + X_{NB} \le 30$ are necessary constraints. Here, $X_{IN} = X_{IN}^Y + X_{IN}^M + X_{IN}^B$ (and similarly for $X_{IB}$, $X_{NB}$).
As an example, let's take the constraints related to $X_{IN}$.
$$ 0 \le X_{IN}^Y \le 4, \qquad 0 \le X_{IN}^B \le 8, \qquad 0 \le X_{IN}^M \le 22. $$
As pointed out in the comments, it is better to explicitly write down each constraint separately. Indeed, $X_{IN} \le 4 + 8 + 22$ would not contain any information about the upper bound of each fare class.
Similarly to what you already proposed, this gets translated into maximizing
$$ Z := 300X_{IN}^Y + 220X_{IN}^B + 100X_{IN}^M + (\text{amounts related to other variables}) $$
Your approach seems to mix 0/1 programming with linear programming, particularly in the last set of equations. How are they meant to be interpreted?
Problem encoding in MiniZinc