A method is introduced to locate the layered structures in the atmosphere and ionosphere based on simultaneous observations of radio wave intensity and phase variations in trans-ionospheric satellite-to-satellite links. The method determines location of a tangent point on the trans-ionospheric ray trajectory where gradient of refractivity is perpendicular to the ray trajectory and influence of a layered structure on radio wave parameters is maximal. An estimate of the location of a layer can be obtained from a combination of the phase and intensity variations. This new technique was applied to measurements provided during FORMOSAT-3 and CHAMP radio occultation (RO) missions. For the considered RO events the location of the inclined plasma layer in the lower ionosphere is found and the electron density distribution is retrieved. The method is checked by measuring the location of the tangent point on the ray trajectory in the neutral gas in the atmosphere. The results showed a fairly good agreement.