Does anyne know how much this journey will cost me please?
International ticket Osijek-Pecs will cost be app. 7,5 EUR (though you'll need to pay in kuna, thus it will be around 56-57 HRK). That is the fare for return ticket, which however strange it might sound costs less (due to special Croatia-Hungary return discount) than one way ticket
...it says that the distance is 487km
That's is a mistake, Croatian Railways (HZ) website isn't the best with international connection. Actual distance is 82 km (32 km on Croatian side and 50 on Hungarian)