As you said, the equation is separable:
dy/dt = 2t / exp(y)
exp(y) dy = 2t dt
Integrate both sides:
∫ exp(y) dy = ∫ 2t dt
exp(y) + C₁ = t ² + C₂
Move the constant terms to one side. When you add them together, you get another constant, so you can ignore the subscript altogether:
exp(y) = t ² + C
Solve for y explicitly by taking the logarithm of both sides:
ln(exp(y)) = ln(t ² + C )
y = ln(t ² + C )
C can be any number; if it happens to be 0, then you have
y = ln(t ²) = 2 ln(t )
so B is the correct choice.
You can also approach this from the opposite angle: Assume y is one of the given solutions, then substitute it into the ODE. (Bit more trial-and-error involved, so not a good idea if you're short on time.)
For example, if y = 2 exp(t ) as in choice A, you have dy/dt = 2 exp(t ), so the ODE would become
2 exp(t ) = 2t / exp(2 exp(t ))
which is clearly (I hope) not true.