Form to partially pay for Event Attendance
You could use Line Items. Create a Price Set with the Attendee Name(s)/Contribution Id(s) that you would like to have available for people to help pay. Donors can enter the amount they want to give toward specific attendee(s). You will have to manually apply these contributions to the attendee's event fee. We do this for tuition here https://radiusinternational.org/paytuition/

The other way to do this is to use Contribution Notes via Profiles. Then the donor would just write in the name that they want to have the money applied to. The downside here is the limited placement of Profiles on the contribution page. Neither of the 2 placement options really puts the Notes anywhere logical in relation to giving form. The Notes are not next to the contribution label so then you have to add a description telling donors where to find the Notes further down the page.