As a native speaker, I would say those sentences could be totally fine for Chinese to understand. However, the position of 了 could change the focus of your sentence slightly.
The first sentence is correct if you want to slightly emphasize you rode the bike to the bookstore.
However, the correct version is better if you want to slightly emphasize you went to the bookstore by bike.
We would barely use this sentence if we want to express "He was ill, and I went to see him yesterday." Instead, we sometimes use 他感冒了，昨天我去看了他, and sometimes use 他感冒了，昨天我去看他了。
These two expressions have no difference in meaning.