Assuming that you are a Maryland resident, you can claim the deduction for your 529 contribution to your friend's daughter's plan, up to $2,500. According to the Maryland 529 website:
Account owners and contributors can each subtract contributions. A contributor need not be a parent or family member of the beneficiary to be eligible for the income subtraction.
For more information, please see:
Maryland 529 Website
How to Maximize your Maryland College Investment Plan Tax Benefits
2024 Maryland Resident Instruction Booklet: See Page 9
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"