Grammatically fine. Seems like a long time to spend doing that, though. , you would write two hours, not 2 hours.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
AnonymousNo, the correct way to say it would be, my neighbor was petting his dog for 2 hours
AnonymousMy neighbor petted his dog for 2 hours.The grammar is correct.
AnonymousGrammerGrammar