I don’t know why you intentionally made your code less readable, but just ... put them on one line:
set serveroutput on
DECLARE
A integer :=10;B integer :=5;
BEGIN
dbms_output.put_line(a ||':'|| b);
END;
/
anonymous block completed
10:5
The semicolon is a statement delimiter in PL / SQL, and it doesn’t matter if you have spaces or newlines; unlike a simple SQL run in SQL * Plus, let's say where the new statement after the separator should be on a new line, but this is the client thing.
Maybe you mean something else, though ...