Is a i5-8600k compatible with ddr4 2400mhz and motherboard b250m pro opt???

Solution
The RAM should work but the b250 motherboard will not. You will need to z370 board for the 8600k. Also Intel recommends 2666 or higher RAM modules for Coffee Lake processors.