confused about delta epsilon proofs

i know how to do basic proofs, but some proofs on the actual limit theorems confuse me. my textbook's choices for delta are very obscure and i have no idea how they even came up with that.

for the proof of the limit theorem where the limit of a product of 2 functions is equal to the product of their limits, my book did: f = L1 + (f-L1) and g = L2 + (g-L2). and they want to show that |fg - L1*L2| < ε if 0<|x-a|<δ.

so with substitution and rearrangement they get |L1(g-L2)+L2(f-L1)+(f-L1)(g-L2)|< ε. since the limit of f as x approaches a is L1 and limit of g as x approaches a is L2, we can find positive numbers δ1, δ2, δ3, δ4 such that:

|f-L1|< sqrt(ε/3) if 0<|x-a|<δ1

|f-L1|< ε/[3(1+|L2|)] if 0<|x-a|<δ2

|g-L2|< sqrt(ε/3) if 0<|x-a|<δ3

|g-L2|< ε/[3(1+|L1|)] if 0<|x-a|<δ4

the rest of the proof i understand but what confuses me is where and how did they get those expressions sqrt(ε/3) and ε/[3(1+|L2|)]?