Divide the total amount of keys produced by the amount of keys a piano requires to find the amount of pianos a factory made:

The factory made 6204 pianos in 12 months.
Because the question asks for the amount of pianos made for the first 3 months, we'll divide the total 12 months by the 3 months the question asks for:

Now we'll divide the total amount of pianos made in 12 months by this number to find the pianos made in 3 months:
1551 pianos were made in the first 3 months of production.