Your problem is that explicit empty string in your formula — it causes it to return everything as a string. You can either get rid of it —
IF(Delivery=BLANK(),BLANK(),DATETIME_DIFF(Return,Delivery,'days'))
— or (my preference), make it unnecessary:
IF(Delivery,DATETIME_DIFF(Return,Delivery,'days'))
(The latter version says, implicitly, "IF {Delivery} IS NOT BLANK, DO DATETIME_DIFF()
, OTHERWISE BLANK()
.)