There is a chance the 'MagSafe Board' may be defective, that is
a name for the DC-in Board which includes circuitry that allows
the MagSafe adapter to power the computer and charge battery
at the same time. It can be partially defective; or appear to be
some other issue. The power management reset, SMC can help;
also the magsafe adapter may have defects. And a battery may
show low-cycles yet be well beyond a useful existence.
If your computer is identified by any of these numbers &/or specs
then yours is a 13-inch Late 2007 MacBook (not pro) if you have
documentation of the original (sales) order number that helps, too.
Introduced November 2007
Discontinued February 2008
Model Identifier MacBook3,1
Model Number A1181
EMC 2200
Order Number MB061LL/B (White), MB062LL/B (White), MB063LL/B (Black)
The part and instructions for replacement of the part are available
in an iFixit repair guide for older macbook (2006-2010) model...
Assuming you've identified the MacBook correctly, the guide to use
for the model suggested, would be based on identifiers noted above:
• MacBook Core2Duo repair guide -- (includes Late 2007 13-inch model)
https://www.ifixit.com/Device/MacBook_Core_2_Duo
The 'model number' is about least helpful to cite, because so many builds
over a few years used that number, among other different spec numbers.
If the problem is the MagSafe Board, note details & difficulty:
https://www.ifixit.com/Guide/MacBook+Core+2+Duo+Magsafe+Board+Replacement/520
Detailed care in removal and replacement so as to not cause any other damages
to the electrical or physical components, is necessary; some school age youth
have been able to replace the MagSafe Board in as little as 15 minutes. If you
are not skilled, an Apple Authorized Service Provider could test, diagnose, &
replace the necessary parts. Other contributing factors may be involved, btw.
While an Apple store Genius may be helpful to troubleshoot, with older Macs,
they tend to not offer repair; yet may suggest off-site third party AASP repairer.
They have their methods; so you may end up going to an independent AASP
anyway. When the computer is open, is also a good time to consider items that
may need replacement. Some of the cost to access the inside, is already involved.
So you may or may not be up to the levels of difficulty and methods involved as
suggested or outlined in the iFixit repair guide that covers your vintage Macbook.
In any event...
Good luck & happy computing!