The first code block contains a typo:
spawn(function()
print("Spawn - started")
wait(2)
print("Spawn - working")
wait(1)
print("Spawn - done")
end)
lua| -----HERE
delay(1, function()
print("Delay - started")
wait(2)
print("Delay - working")
wait(2)
print("Delay - done")
end)