Relativistic effects and lanthanide contraction
The lanthanide contraction is caused by two effects


The 4f orbitals are very diffuse and therefore result in poor screening of the electrons further out, those in the n=5 and n=6 orbitals
relativistic effects


This Wikipedia article presents a nice discussion of the lanthanide contraction.  The article estimates that the first effect, the screening effect, is the major factor, with relativistic effects playing only a minor role (~10%) in the observed contraction.


  what I do not understand how do they match, one of them decreases the
  radius and the other one should expand it as the f orbitals expand
  right?


That's correct, the outer s- and p-orbitals contract due to the lanthanide effect, while d- and f-orbitals expand (see this SE Chem post for a more detailed description).  In the lanthanide series, the 6s electrons are further from the nucleus than the 4f electrons, therefore they (the 6s electrons) determine the radius.  A contraction of the 6s orbital radius results in a contraction of the observed lanthanide electron radius, even though the 4f electrons have moved slightly further away from the nucleus.