If the dose requires that a total of 40 mg be given, then you take the ratio of the stock bottle (mg/mL) and solve for the total amount of mL that are needed by multiplying the amount of mL required (x):

Multiply by 5 on both sides to give:

Then solve for x:

Another, possibly quicker, way to solve would be to set up a proportion - one side the stock bottle ratio, and the other side the dosage requirements:

Cross multiply and you get:

And you would solve this the same way as above.
So
the patient should receive 9.091 mL of secobarbitol.