(1/12) + (1/6) = (1/x)
3/12 = 1/x
x= 4
Now why?
The reciprocals are rates.
If x = the time they both work when working together:
x/12 is the amount of the job Juan does and x/6 is the amount of the job Berto does and together they do the whole job.
This means (x/12) + (x/6) = 1 which results in the equation with which I started.