Actually, the locant number depends on the group that is to the attached to the ethyl group.
In the first pic, if it is a functional group that is linked to the dashed line, then since that has to be given the lower locant number due to more preference, the cyclohexyl group is given lower locant number (it is just a substituent).
In the second pic, there is no problem, I presume.