Stock portfolio is weighted in $ not shares.
weight = 100% * (position value) / (portfolio value)
Stock A
155 * $88 = $13,640
Stock B
130 * $98 = $12,740
if these are the only two positions in the portfolio then the total portfolio value is:
$13,640 + $12,740 = $26,380
weight A = 100% * $13,640 / $26,380
= 51.7%
then, since there's only two positions the weight of B is: 100% - 51.7% = 48.3%