Question 248671
You actually have two problems here.
You need to find out when train A and the boy meet and when train B and the boy meet. 
Train A and the boy will meet after traveling the same amount of time.=time ta
Train B and the boy will meet after traveling the same amount of time.=time tb
or How far train B would have gone in the same time as it took train A to hit the boy.

How about distance?
Well for going east the boy has a 10 mile head start so you have to add 10 miles to his distance.
Going EAST
the boy travels at .5mph for ta time
rate times time =distance
x=mile marker from train a
.5*ta=x-10
.5*ta+10=x
Train A travels at 10mph
rate times time =distance
10*60*ta=x
set them equal
.5*ta*60+10=10*ta*60
multiply both sides by 2
ta+20=2*10*ta
ta+20=20ta
subtract ta from both sides
20=19ta
divide by 19 (both sides)

20/19=ta
1.0526 hours
63.1578 minutes
1/2*1.0526=.5263 miles from the boys start
now train B will have gone 8.4214
1.5786-.5263=1.05226 from the boy after 1.0526 hours
Which will be 1.5786 miles from the boys start and 1.05226 miles from the boy at the same time.

So train A will have hit the boy first
Check for reasonableness
after one hour 
train A will have gone 10 miles at 10 mph
train B will have gone 8 miles at 8 mph
The boy will have gone .5 miles at 1/2 mile an hour
We could have also calculate exactly when and where  train B and the boy wold have met and compared to train A but since we weren't asked that there was no need to do that.