A m-mass orange is thrown into a cart. When the orange comes into contact with the cart, assume it experiences an upward acceleration of magnitude a. Write the correct equation for the orange's mass m. Consider upward as the positive direction.

I found an answer from www.khanacademy.org
What is Newton's second law? (article) | Khan Academy
It's used in almost every chapter of every physics textbook, so it's important to ... Newton's second law tells us exactly how much an object will accelerate for a ... law shown above, we see that the acceleration is proportional to the net force, Σ F ... When using these equations we must be careful to only plug horizontal forces ...
For more information, see What is Newton's second law? (article) | Khan Academy
The Newton's second law says that an object's rate of change of momentum is proportionate to its force.
F = ma, where, f - force, m - mass, and a - acceleration.
Step 1: Draw a diagram of the forces acting on the object.
Given that
Mass of the orange = m
Orange is accelerating upwards
1) The orange's weight is acting downwards due to gravitational force.
2) Normal force F_n acting upwards opposing the weight of the orange
Vertical forces F_v = F_n - F_g
Step 2: Develop an expression to represent mass of an object.
Using the Newton's second law of motion.
Vertical net force F_v=ma_v
F_n-F_g\ =\ ma_v
m=\frac{F_n-F_g}{a_v}
Hence, Orange's mass equation m=\frac{F_n-F_g}{a_v}