If I understand your question correctly, you cannot do this. In the view, the records created from FormA will end up on a different row than FormB, thus you can not do any calculations on them. I might be able to help if you give more details to your issue. Why are their two forms? If the documents are different why? If this separation is necessary, can they be combined in the backend to another document with a different form for display in a view?