All you need to do is write out your detailed plan in an email to your loan officer, your loan officer forwards it to their underwriter, and the underwriter says "Yup" or "Nope" to it being able to work out or not. In the situation the funds are coming directly from the borrowed funds source, rather than going into your cousin's account first, the underwriter may want to see a copy of the personal line of credit monthly statement to make sure you are not listed as an obligator on it.
What you are proposing to do is perfectly fine according to lending guidelines, where a donor gets their funds is only concerning if they are taking out borrowed funds that you would somehow be responsible for (either by you being obligated on the borrowed funds or having a side-agreement to pay the borrowed funds directly or indirectly) but you'll want to make sure the underwriter is on board from the beginning as some can be uncomfortable.
Fannie Mae's gift guidelines: https://www.efanniemae.com/sf/guides/ssg/sg/pdf/sel092010.pd
Verifying Donor Availability of Funds and Transfer of Gift Funds
The lender must verify that sufficient funds to cover the gift are either in the donorâ€™s account or have been transferred to the borrowerâ€™s account. Acceptable documentation includes the following:
â€¢ a copy of the donorâ€™s check and the borrowerâ€™s deposit slip
â€¢ a copy of the donorâ€™s withdrawal slip and the borrowerâ€™s deposit slip
â€¢ a copy of the donorâ€™s check to the closing agent, or
â€¢ a settlement statement showing receipt of the donorâ€™s check.
When the funds are not transferred prior to settlement, the lender must document that the donor gave the closing agent the gift funds in the form of a certified check, a cashierâ€™s check, or other official check.