We know, shortest distance between two points
and
is :

So, distance between house and library is :

Distance between library and post office :

Distance between post office and house :

Therefore, minimum distance that you can ride your bike is (5.39+7.07+7) km = 19.46 km.
Hence, this is the required solution.