X-ray and radio emissions in the early stages of solar flares