The first two are OK. The second two are incorrect. It's "has been riding" and "had been riding", not "ridden".
She rode her bike yesterday.
She was riding her bike when I saw her.
She has been riding her bike for three hours.
She had been riding her bike for three hours when the front wheel fell off.
Student or Learner