Hello miera630,
Thank you for using Apple Support Communities.
We understand that the tip on your Apple Pencil was broken and part remains inside the pencil and needs repair. The pencil is still under warranty. You want to know what it will cost to repair. You can take a look at this support article for more information on the repair costs of the Apple Pencil.
iPad Service and Repair
Apple accessories
The Apple-branded accessories that come in the box with your product, including the cable and power adapter, are covered by the Apple Limited Warranty for accessories, your AppleCare+ plan, and consumer law.
The following Apple accessories for iPad are also covered under AppleCare+ for iPad, including accidental damage. You can use an incident of accidental damage included in AppleCare+ for iPad to cover the damage to these accessories. Or you can pay the out-of-warranty service fee.
Replace or repair your Apple Pencil
To determine the costs for your country, you'll want to use the drop-down menu at the top of the article, or click on the country on the lower-right corner of the page.
If you have additional questions about pricing, or want to set up service you can contact Apple using: Get Support
Best regards.