If you join your tables together first:
select mt.id, mt.cust_mobile, mt.type, lt.parent_id
from master_table mt
left join link_table lt on lt.id = mt.id;
ID CUST_MOBIL TYPE PARENT_ID
---------- ---------- ----- ----------
1 9000230003 cust 2
2 8906784566 ret 8
3 7474747474 dist 7
4 4595274646 sdist 5
6 8588775958 cust 3
5 8588585958 fse
8 8588777758 dist
you can then use a hierarchical query against that, as an inline view or CTE, starting with any 'cust' entries:
with cte (id, cust_mobile, type, parent_id) as (
select mt.id, mt.cust_mobile, mt.type, lt.parent_id
from master_table mt
left join link_table lt on lt.id = mt.id
)
select listagg(id ||','|| cust_mobile ||','|| type, ',')
within group (order by level) as result
from cte
start with type = 'cust'
connect by id = prior parent_id
group by connect_by_root(id);
RESULT
--------------------------------------------------------------------------------
1,9000230003,cust,2,8906784566,ret,8,8588777758,dist
6,8588775958,cust,3,7474747474,dist
This concatenates each row's relevant data into a single value separated by commas; and then each of those combined entries is put into a single result using listagg().
Just for fun, you could also use a recursive CTE (from 11gR2); here I've moved the initial concatenation inside the CTE just to separate it from the listagg():
with rcte (id, id_mobile_type, root_id, hop) as (
select mt.id, mt.id ||','|| mt.cust_mobile ||','|| mt.type, mt.id, 1
from master_table mt
where mt.type = 'cust' -- starting condition
union all
select mt.id, mt.id ||','|| mt.cust_mobile ||','|| mt.type,
rcte.root_id, rcte.hop + 1
from rcte
join link_table lt on lt.id = rcte.id
join master_table mt on mt.id = lt.parent_id
)
select listagg(id_mobile_type, ',') within group (order by hop) as result
from rcte
group by root_id;
RESULT
--------------------------------------------------------------------------------
1,9000230003,cust,2,8906784566,ret,8,8588777758,dist
6,8588775958,cust,3,7474747474,dist