What is the priority for numbering alkyl side chains?
The process for naming this molecule correctly follows the steps listed here:


Identify the parent hydrocarbon, which will be the one with the longest chain. It is correctly identified as the 7-carbon chain, and as such is a derivative of heptane.
Identify the side-chain functional groups. We have 2 methyl groups and an ethyl group.  When listing them, they will be written alphabetically.  So, we have:

X-ethyl-Y,Y-dimethylheptane and not Y,Y-dimethyl-X-ethylheptane
Numbering (which is what you are asking about) is determined by numbering the carbon atoms consecutively from the end of the chain nearer the functional group of the highest priority. In terms of molecule numbering, alkane groups have the same functional group priority. We would only need to consider relative priorities of the ethyl and methyl groups if there was only one methyl substituent, in which case you would have 3-ethyl-5-methylheptane. 

In our case, the process is to count in from the ends of the primary chain. Here, the first substituents occur at an equal distance from each end of the chain, both the ethyl and the methyl occur at position 3. We now need to invoke one of the IUPAC sub-rules for nomenclature. If the first substituents occur at an equal distance from each end of the chain, we need to number from the end nearer a second substituent. The second substituent is the extra methyl group, and so this is the end that gains numbering priority.


There are many nice examples of nomenclature on the internet. One very good example, which highlights your question is this page. Have a look at Rule 2 and sub-rule 2