You'll need a new motherboard to go with it. The 5350 is socket am1, the fx 6300 is socket am3+. Unless you're getting a great deal on the 6300 you may want to consider a more thorough upgrade. As it is the 6300 will require a new motherboard, if you have to buy a new mobo anyway maybe consider an intel or ryzen cpu. It would mean moving to ddr4 ram also but it either intel or ryzen would be a nice upgrade to the fx cpu's, much less the one you've got now.