get max date by comparing total amount with amount in another table
The requirements seem complex but if you calculate the running totals first, it's a simple comparison.

Find the first running_total from b that has covered the running_total from a:

WITH 
  rta AS
    ( SELECT [S.no], amount,
             running_total = SUM(amount) OVER 
                                 (ORDER BY [S.no]
                                  ROWS BETWEEN UNBOUNDED PRECEDING
                                           AND CURRENT ROW)
      FROM tableA
    ),
  rtb AS
    ( SELECT trxn_dt, id,
             running_total = SUM(paid_amt) OVER 
                                 (ORDER BY trxn_dt, id
                                  ROWS BETWEEN UNBOUNDED PRECEDING
                                           AND CURRENT ROW)
      FROM tableB
    )
SELECT
    a.[S.no], a.amount, b.trxn_dt
FROM rta AS a
  OUTER APPLY 
    ( SELECT TOP (1) b.trxn_dt
      FROM rtb AS b
      WHERE a.running_total &lt;= b.running_total
      ORDER BY b.running_total, b.trxn_dt, b.id
    ) AS b ;


Tested at rextester.com.