For booking a bus,train within europe try omio.com. you will get a ticket for around 38euro i guess from Barcelona to madrid
from madrid head towads ibiza by flight. from ibiza u cn go to seville if u want...further most is seville from Barcelona...
you can check the prices of bus or train in omio.com from one place to another