Source: Principles of Physics
Problem
An elevator cab and its occupant have a combined mass $M$. The cab is pulled upward by a cable. When an occupant drops a coin, its downward acceleration relative to the cab is measured to be $a_{rel}$. The acceleration due to gravity is $g$.
T = M a_{rel}
Let the upward direction be positive. The acceleration of the dropped coin relative to the ground is $a_{c,g} = -g$. The acceleration of the coin relative to the elevator is given as $a_{c,e} = -a_{rel}$.
The relationship for relative acceleration is $a_{c,g} = a_{c,e} + a_{e,g}$, where $a_{e,g}$ is the elevator's acceleration relative to the ground. We can solve for the elevator's acceleration:
$$a_{e,g} = a_{c,g} - a_{c,e} = (-g) - (-a_{rel}) = a_{rel} - g$$Now, apply Newton's second law to the elevator system of mass $M$. The forces are the upward tension $T$ and the downward weight $Mg$.
$$\sum F = T - Mg = M a_{e,g}$$Substitute the expression for the elevator's acceleration:
$$T = Mg + M(a_{rel} - g)$$ $$T = Mg + M a_{rel} - Mg$$ $$T = M a_{rel}$$The tension is the product of the total mass and the apparent acceleration due to gravity inside the cab.