I recommend the bus rather thzn the Feve raikway, Tis Valeria, or anyone else, uf there us a choice. The railway calls at lots of villages, whereas the bus takes the motorway and only goes into the cities. The complete opposite to the UK. Bilbao to Santander by Feve, three hours. Santander to Bilbao by Alsa bus, about half that. Cost about 7euros. Brilliant system.
All three stations , bus, feve and renfe are close, about five mins walk from the ferry. You'll walk past a Luoz suoermsrket if you need picnic stuff.
Remember to take a numbered ticket from the stand when you join the queue to buy your tickets. The njmber comes up at the booth when it's your turn.
Nb, I don't think I'd bother about booking bus tickets unless it was a busy oeriod or the timing was vital, there are frequent services on the main routes, so you'd get on the next if the first was full. We haven't had a problem, yet!