Since there are 3 workers for 3 houses to be built in 3 days, then we can see we have 1 worker per house per day. Therefore we have 4 groups of 3 therefore, 4 workers can make 4 houses every day, since 1 worker per house per day. Therefore we can multiply 4 houses per day x 12 days which equals 48 houses.
You have to notice the dependence of the amounts to every specific units which are given to you. We have 3:3:3 to 12:12:... ; the ration has increased 4 times. You have to implement that information, and here you are, the outcome is 48 houses in 12 days. As the 3 workers has been doing job in 3 day it has been 3 houses (roughly one house done by one worker) - there 12 workers in 12 days (ration increased by 4) that's why we multiply those by 4 and get 48.
If we consider 3 workers as one unit then we can rephrase the sentence as one unit of workers will build 3 houses in 3 days which is equal to one house a day.
Since there are 4 groups of 3 in 12 (12/3 = 4) then we can say there are 4 units of workers instead of 12 workers. Since we know 1 unit of workers can build 1 house a day then 4 units must be capable of building 4 houses every day. Therefore, if they work for 12 days then we simply multiple 4 by 12 giving us 48 houses in 12 days.