Einstein's book - Relativity I read the Chapter 8 of this book "On the idea of time in Physics" :

Lightning has struck the rails on our railway
embankment at two places A and B far distant
from each other. I make the additional assertion
that these two lightning flashes occurred simultaneously.
If now I ask you whether there is sense in this statement,
you will answer my question with a decided “Yes.” But if I
now approach you with the request to explain to me the
sense of the statement more precisely, you find after some
consideration that the answer to this question is not so
easy as it appears at first sight.
After some time perhaps the following answer would
occur to you: “The significance of the statement is clear
in itself and needs no further explanation; of course it
would require some consideration if I were to be commissioned to determine by observations whether in the
actual case the two events took place simultaneously or
not.” I cannot be satisfied with this answer for the following reason. Supposing that as a result of ingenious
considerations an able meteorologist were to discover that the lightning must always strike the places A and B
simultaneously, then we should be faced with the task of
testing whether or not this theoretical result is in accordance with the reality. We encounter the same difficulty
with all physical statements in which the conception
“simultaneous” plays a part. The concept does not exist
for the physicist until he has the possibility of discovering whether or not it is fulfilled in an actual case. We
thus require a definition of simultaneity such that this
definition supplies us with the method by means of
which, in the present case, he can decide by experiment
whether or not both the lightning strokes occurred
simultaneously. As long as this requirement is not satisfied, I allow myself to be deceived as a physicist (and of
course the same applies if I am not a physicist), when I
imagine that I am able to attach a meaning to the statement of simultaneity. (I would ask the reader not to proceed farther until he is fully convinced on this point.)
After thinking the matter over for some time you
then offer the following suggestion with which to test
simultaneity. By measuring along the rails, the connecting line AB should be measured up and an observer
placed at the mid-point M of the distance AB. This
observer should be supplied with an arrangement (e.g.
two mirrors inclined at 90°) which allows him visually to
observe both places A and B at the same time. If the
observer perceives the two flashes of lightning at the
same time, then they are simultaneous.
I am very pleased with this suggestion, but for all that
I cannot regard the matter as quite settled, because I feel
constrained to raise the following objection: “Your definition would certainly be right, if I only knew that the
light by means of which the observer at M perceives the
lightning flashes travels along the length A $\to$ M with
the same velocity as along the length B $\to$ M. But an
examination of this supposition would only be possible
if we already had at our disposal the means of measuring time. It would thus appear as though we were moving here in a logical circle.”
After further consideration you cast a somewhat disdainful glance at me—and rightly so—and you declare:
“I maintain my previous definition nevertheless,
because in reality it assumes absolutely nothing about
light. There is only one demand to be made of the definition of simultaneity, namely, that in every real case it must supply us with an empirical decision as to whether
or not the conception that has to be defined is fulfilled.
That my definition satisfies this demand is indisputable.
That light requires the same time to traverse the path
A  $\to$ M as for the path B  $\to$ M is in reality neither a
supposition nor a hypothesis about the physical nature of
light, but a stipulation which I can make of my own
freewill in order to arrive at a definition of simultaneity.”

I did not understand what he meant by this sentence:

That light requires the same time to traverse the path
A  $\to$ M as for the path B  $\to$ M is in reality neither a
supposition nor a hypothesis about the physical nature of
light, but a stipulation which I can make of my own
freewill in order to arrive at a definition of simultaneity.”

Can someone explain what he meant by this sentence?
Why is he using this sentence? Doesn't light have the same velocity in both directions?
NB: Kindly explain the meaning of the sentence along with its necessity
 A: 
"That light requires the same time to traverse the path A → M as for
the path B → M is in reality neither a supposition nor a hypothesis
about the physical nature of light, but a stipulation which I can make
of my own freewill in order to arrive at a definition of
simultaneity.”
Can someone explain what he meant by this sentence? Why is he using
this sentence? Doesn't light have the same velocity in both
directions?

Einstein was always careful and explicit to say that his postulate “the speed of light is the same in all reference frames” (paraphrasing) was a stipulation, not a deduction.  This means that the constant speed of light is taken as a given, or assumed to be true, without needing to explain how or why it is true.  Einstein is stating here that he has chosen to assume that the speed of light is the same in both directions on the train in order to create a definition of simultaneity.
For context of why he would say this, consider the Galilean interpretation of light transmission between moving bodies.  If I am at rest and a rocket coming toward me fires a photon, I expect that the time that the photon takes to get to me will simply rely on the location of the rocket when the light is fired.  The photon will have to travel that entire distance, independent of whether the rocket is sitting still or chasing along behind it.  However if the rocket is considered fixed in space and I am traveling toward it, then the Galilean expectation would be that I will closed the gap toward the light, and the amount of time it will take to arrive will be shorter.  Under Einstein's special relativity, the reference frame is always chosen to be considered as if the observer is at rest.  As he stated in his 1905 paper on special relativity,

“...light is always propagated in empty space with a definite velocity
c which is independent of the state of motion of the emitting body.”

This is exactly the point of the train thought experiment.  From an external view from the embankment, the expectation is that the moving observer on the train will travel toward the light emitted at the front of the train and meet it prior to the light catching up from the rear of the train.  By Einstein’s definition of simultaneity, the lightning strikes will be only be considered as simultaneous from the perspective of the embankment.  From the perspective of the person on the train, the lighting strikes will be determined to be not simultaneous.  This shows that whether an event is determined to be simultaneous or not is dependent on the frame in which events are considered, hence the phrase “relativity of simultaneity”.
Symmetrically, there will be other events that people on the train will perceive as simultaneous, and that people on the embankment will consider not simultaneous.  The definition of whether events are simultaneous on the train derives from from Einstein’s stipulation for clock synchronization; that light from the front of the train and from the rear of the train both take the same amount of time to arrive, when considered in the frame of the train.  This stipulation, as Einstein states in your quotation, depends on “neither a supposition nor a hypothesis about the physical nature of light”.  Einstein chose to stipulate it as true in order to define what "simultaneous" means, in this case within the frame of the train.
A: Doesn't light have the same velocity in both directions?
Yes of course. But to talk about velocity you must measure distance and time. And to measure time you must define simultaneity. "It would thus appear as though we were moving here in a logical circle." So, to resolve this problem "That light requires the same time to traverse the path A —> M as for the path B —> M is in reality neither a supposition nor a hypothesis about the physical nature of light, but a stipulation which I can make of my own freewill in order to arrive at a definition of simultaneity."
