Two balls of yarn to weave a scarf.
Since the brown is in the warp and the weft it needs to be longer, is it?
Some information on the yarn:
Blue is two ply and brown is three ply
Both weigh 3.5 ounces, not to be confused with yarn weight.
The yarn weight is the thickness. The yarn weight of the blue is worsted aran. The yarn weight of the brown is worsted DK. (See the chart below.)
A lighter weight yarn is going to look smaller and may have more plies, but will go a lot further than the bulkier yarn. Here is another chart that may be helpful for calculating how much yarn you will need for a given project.
There are quite a few yardage calculators and apps for weaving, knitting and crocheting that make it easy for you.
So, how much was in each ball? Take a look at the labels to find out.