The wonderful (but also awful) thing about math is that there is often more than one way to look at a problem and solve it. Your way worked and is logical, but I prefer to think of things Esme's way. Choose whichever one works best for you and stick with it.
With Esme's way, always find how many mg are in just one mL. For example,
Your given dose is 320mg/5mL. What you're looking for is (x)mg/1mL. Algebraically, it'll look like this:
320/5 = x/1
Of course, dividing anything by 1 means it's just a whole number (i.e. 5/1 = 5; the value is unchanged), therefore we can ignore the 1. As a result, your calculation will look like this:
320/5 = x
So, divide 320 by 5...
64 = x
Now we know that there are 64mg in each mL. Then, think of it like this: there are 64mg in each mL. You are giving 15 mL, 64mg multiplied by the 15 mL you are giving = 64 * 15 = 960.
If you're curious, though, the mathematical way of doing it is like this:
The order is to give 15 mL. There are 64mg/mL. The question is looking for how many mg in 15 mL, or (x)mg/15mL.
(x)mg/15mL = 64mg/mL
To make it easier to "see" the math, let's take away the mg and mL...
x/15 = 64
Isolate (x). Because (x) is being divided by 15, to cancel it out, we do the opposite (in this case, multiply) by the same number, and as always, what we do to one side, we do to the other. As a result, multiply both sides by 15.
x = 960
Therefore, there are 960mg in 15 mL.
This looks very long and difficult, but only because I'm outlining each and every step of the process. Once you get practice, you can skip a lot of the little thoughts I have here, and go straight to whatever you need to do mathematically. For me, I already know I can go ahead with 320/5, then multiply by 15 without having to think of any of the other things.
Let's do another example with completely random numbers and a completely different problem, but with the same algebraic concept.
Say you get an oral solution from pharmacy labeled 530mg/5mL.
The order says to give 371mg.
So, how many mL do we need?
Therefore, the value we are looking for is (x)mL.
As before, we find out how many mg are in each mL, or 1mL, therefore, we are looking for (x)mg/mL.
(x)mg/mL = 530mg/5mL --> x = 530/5
x = 106
Therefore, there are 106mg/mL
We need to give 371mg, but how many mL does it take to get that?
This can be represented as 371mg/(y)mL, where we solve for (y). We know that 106mg/mL. As before, I'm going to leave out the mg and mL to make the numbers clearer.
371/y = 106
Isolate (y). To do this, we get rid of the fraction, so we multiply both sides by (y)
371 = 106 * y
Further isolate (y), so divide both sides by 106.
371/106 = y
3.5 = y
Therefore, you need 3.5mL.