ok then if we take from the first package one cookie, from the second 2 cookies and so on till we take from the 10th package 10 cookies we' ll have: 1+2+3+4+5+6+7+8+9+10=55 cookies in total

If we weigh them and each cookie weight 10g then we would have 55 x 10 = 550g

so we put them on the scale, see the result and we can understand from which package is the lighter cookie because par example if the result is 549g then we can understand that the lighter cookie was on the first package from where we took one cookie, if the result was 548g we assume that it was from the second package from where we took 2 cookies and so on...

i hope i didn't mix up but i think that's the right way to do it