If you have a toilet bowl with a Fluidmaster 300 fill valve and it needs to be replaced then you can use this 5 step picture guide to help you complete the task. Before working on your toilet you will need to shut the water supply off to the toilet. You then will need to disconnect the toilet water supply line from the bottom fitting of the toilet fill valve. Before you want to go any further you will also want to flush the toilet bowl and then sponge any remaining water from inside of the tank. This will prevent the bathroom floor from getting wet once you pull the valve from the toilet. The replacement for this toilet valve you can find in many stores is the Fluidmaster 400A.
After removing the water supply the first step will be to remove the nut that holds the Fluidmaster Toilet Fill Valve to the tank. You will need to remove the white nut that is pictured below. You can use a pair of channel lock pliers to remove this nut. You will want to turn the nut counter clockwise which is to the left to loosen it.
The next thing you will want to do is to remove the toilet tank lid so you can access the Fluidmaster inside the toilet bowl tank. The Fluidmaster is the black valve to the right in this photo below. This is the valve that allows the water to fill the toilet tank.
Now that you have the toilet bowl tank lid off and you can see the Fluidmaster 300 Fill Valve you can grab the fill hose and remove it from the overflow. You can just pull up on the valve and it should pull straight out. You will not be able to pull the Fluidmaster out unless you have already complete step one which is to remove the lock nut that holds the fill valve into place.
You will now want to continue to pull the valve completely out of the tank. Be sure to do this slowly so you do not get caught up on the toilet flapper chain.
This is what the inside of the toilet bowl tank will look like once the Fluidmaster 300 has been fully removed. You can see the hole that the toilet fill mounts into on the right hand side of the picture.