yeah a 40t should give you more low end power, you might want to try putting a 13t on the front, it would be cheaper and should give you the same results. try the 13/38 combo. no not any sprocket would work, rockymountain atv should have what you need for the kfx.
You can use the 400ex or 450r honda rear in 40 tooth. You can use the old bolts but i dont know how long it will hold up. I bought a set of dirt buke sprocket bolts for 10 or so with the tapered head. You need to drill the hubs old threads out for the bolt shaft size. it comes with nuts and hold perfectly. I have it on mine. Unfortunately the sprocket specialties one lasted a few weeks till it chipped a tooth.
A 13 would work too. similar ratio.
Oh did I mention 20 dollars for the honda sprockets online?