Switching the sides means the error factor is going to be 1/2 of what it appears to be. It appears that the melons weigh 1/4 less when switched

In the original weighing, each melon appears to be 1/8 kg. In the second weighing, each melon appears to be 1/2 kg.

note, 1/8 is 1/4 of 1/2

So, the actual error factor is 2 (half of 4). Therefore, one bar is twice as long as the other bar.

You can show this to work out:

1kg 8melons

-------------------- ----------

2x units long ^ x units long

Since the left side is twice as long, it is acting like there is 2kg on the left. Each melon weights 1/4 kg on the above scale.

2melons 1kg

-------------------- ----------

2x units long ^ x units long

Since the left side is twice as long, it is acting like there are 4 melons on the left. Each melon weights 1/4 kg on the above scale.