Scripting is basically putting the text into the game, making sure it fits the screen etc. A lot of VN engines have line count limits and stuff like that, so you'll often see lines go out of the textbox etc. Scripting is basically making sure all the lines fits the box and all that.
Beta testing is, well, a beta test. They have people check for bugs, look for typos, make sure everything works and so on.
How long these two takes depends on the game. For instance, if there is a large amount of troublesome lines in scripting, or if there is a game breaking bug that needs fixing spotted in testing, it will obviously mean it will take longer. A bit hard for anyone outside of MG to make any estimate on that.