It is hard to figure out the structure of the data and to write a query and test it with just a screenshot. What you should do is post representative sample data in a manner that someone can copy and past to their query window and then be able to write a query against that.
What I mean is something like shown below. This is not the complete data set you posted - I am just showing how you would want to post your sample input data.
CREATE TABLE #tmp
INSERT INTO #tmp VALUES
Once you have done that, most of the regulars on this forum would be able to suggest accurate solutions. More often than not, the difficult part is understanding your data and creating sample data to write a query against. Once you help in doing that by posting DDL as I have shown below, the rest is usually easy.
The query I posted early does traverse up the tree and give you the result you are looking for based on the sample data I created.
DECLARE @CompItem VARCHAR(32) = '05050';
;WITH cte AS
SELECT Comp_Item_No, Par_item_no, 0 AS Lvl
Comp_Item_no = @CompItem
y.Comp_Item_No, y.Par_item_no, Lvl+1
INNER JOIN #tmp y ON
y.Comp_Item_no = c.Par_item_no
SELECT TOP (1) Par_Item_No FROM cte ORDER BY Lvl DESC;