I was thinking of a problem that most of the lecture notes go over when introducing special relativity to the students.

Consider a spaceship with Alice inside it. Let's say the spaceship is traveling at a speed of $0.7c$. Alice then shines a laser light and tries to calculate the time taken by the light to hit the other end of the spaceship, assuming the spaceship has a length $50 m$. Bob is watching all of this from outside and tries to calculate the same quantity. If we denote Alice's time (time measured in Alice's frame) as $t\_{A}$ and Bob's time (time measured in Bob's frame as $t\_B$, the goal is to find out the numerical values of $t\_A$ and $t\_B$.

Here is my attempt.

First, $\gamma = 1.4$

So, for Alice,

$t\_A = \frac{50}{c} s$

Bob, however, will disagree with the time measured by Alice (time dilation). He will say that the light took $t\_B = \gamma t\_A = \frac{70}{c} s$.

My question is:

Can we arrive at the same answer if we consider this problem from the view point of length contraction?

My confusion is: Bob will see that the spaceship itself is length contracted. So, for him, $l\_{spaceship} = 35.7 m$ . Also, by the time the light travels a distance of $35.7 m$, the right end of the spaceship will have moved farther to the right. I believe that the reason why $t\_B$ turned out to be $\frac{70}{c} s$ earlier is simply the manifestation of this idea that the spaceship had a chance to move farther to the right. So I am confused as to what "time" should I be using to calculate this extra distance moved by the spaceship if I consider Bob's viewpoint? I might be confusing something very fundamental, but I would appreciate any help.