Peer review: how to deal with a paper based on an already published work whose validity to the reviewer is uncertain
From what you have written, it seems that you have determined fairly clearly that the results of Paper A are conditionally correct.  That is something that is clearly worth reporting in your review.  You're also dubious about Paper B, which is also clearly worth reporting, even if you have no solid evidence that it is wrong.

I think there is one further question that is worth making a clear statement on: are the results of Paper A interesting as a conditional conjecture, or are they only interesting if Paper B is solid?  For some problems, work based on the consequences of a result is interesting even if the result itself is not solid: famous examples include the Riemann hypothesis and P vs. NP.  Paper B is almost certainly not so significant as these, but it still may be interesting---or it may not be.

I would thus recommend reporting what you have written here, plus your assessment of how interesting Paper A is given the conditionality on Paper B.  This should give the editor sufficient information to proceed.