Lorentz Transformation Exercise confusion So there is this very simple situation in one of my exercices: 

In the earth's frame of reference a tree is at the origin and a pole  is at $x=20$km. Lightning strikes at both the tree and the pole at $t=10$ microseconds. The lightning strikes are observed by a rocket traveling in the positive x-direction at $0.5c$. 
1) At what time does the lighting strikes take place in the rocket's reference frame?. 

I understand the concepts of time dilation, length contraction and etc, but the questions bring me confusion sometimes because they are not very well formulated in my sense. In this exercise I have difficulty understanding what do they really actually mean by 'the time in the rocket's reference frame.'
First it could mean that in the earth's reference frame what is the dilated time that an observer in A (earth) would measure for B (spaceship). An analogy could be that an observer in A measures that it takes his twin 16 years (dilated time) to age by the proper time of 8 years. So the proper question would be what is the dilated time $(t')$ that observer A measures, if it follows correctly the analogy. So we stay in Earth's reference frame and we are only measuring $t'$ as measured by an observer A (and not the time that take place in the rockets frame of reference which is different is my sense as explained below.)
Now a second meaning could be what is the proper time that someone traveling in the spaceship in his OWN frame of reference measures. Following the analogy, the time that it takes someone to go back to earth in the spaceship is 8 years because he measures his own proper time (which is different from the dilated time measured by an observer A on earth). 
So when we use the equation $t'= \gamma(t-vx/c^2)$ or the one for position what do we really mean by $t'$? What I think is it is $t'$(dilated time) as measured in frame A because that is what we do in time dilation for example: When the twin measures proper time 8 and gamma factor 2 so $t'=16$ but here we are still measuring dilated time of B IN Earth's frame of reference A and not proper time in the spaceship reference frame B.
So here is my confusion. Does in the question they just 1) what they really mean is at what time does the lightining take place in spaceship B as measured by frame A. 
So how do I get over this confusion?  
 A: Your confusion comes from overthinking the issue in terms of time dilation and length contraction rather than by just thinking in terms of what each observer would measure. In this problem, we have 2 frames of reference, the Earth's frame, $E$, and the spaceship's frame, $S$. Attached to $E$ is a coordinate system $(x,y,z,t)$ and attached to $S$ is a coordinate system $(x',y',z',t')$. An observer in $E$ uses the $(x,y,z,t)$ coordinate system to make measurements and observations and similarly an observer in $S$ uses $(x',y',z',t')$ to make measurements and observations. In this sense, $t$ is the time elapsed since $t=0$ in frame $E$ and $t'$ is the time elapsed since $t'=0$ in frame $S$.
Any given event, $P$, in space time can be described by a set of 4 coordinates. In the $E$, event $P$ has coordinates $(x_P,t_P)$ where I've neglected the $(y,z)$ coordinates for simplicity and since this problem is a two dimensional problem. In $S$, event P has the coordinates $(x'_P,t'_P)$. So we say event $P$ happened at displacement $x_P$ and at time $t_P$ in $E$, while it happened at displacement $x'_P$ and time $t'_P$ in $S$. In this language, the question the book is asking then is: "Given two events $P_1$ and $P_2$ (lightning strikes) which happen in frame $E$ at displacements and times $(x_{P_1},t_{P_1})=(0~\text{km},10~\mu\text{s})$ and $(x_{P_2},t_{P_2})=(20~\text{km},10~\mu\text{s})$ respectively, at what time(s) $t'_{P_1},t'_{P_2}$ do they occur in $S$?"   
All that is required, then, is to make a relationship between $(x,t)$ and $(x',t')$ for any given pairs of $(x,t)$ and $(x',t')$. Generally $(x,t)$ and $(x',t')$ will be related by a Poincare transformation which would include translations, rotations, and Lorentz boosts. For this one dimensional problem, we can get rid of the rotations, and for simplicity we can get rid of the translations by setting $(x,t)=0$ and $(x',t')=0$ to be the same space time point (this is simply saying that we set the origin of the two frames to coincide). Given these simplifications, we are left with only a single dimensional Lorentz transformation: $$x'=\gamma(x-vt)$$$$t'=\gamma\left(t-\frac{vx}{c^2}\right)$$
You are given the two pairs of  $x$ and $t$, it is sufficient here to simply plug and chug to get the pair of $t'$. 
