2005 Ford F150 with engine noise

Last fall my truck began to have an engine knock and check engine light came on. We changed the plugs…an ordeal in itself, but it continued with the knock. Took it to the dealer and was told they didn’t know what the problem was. An independent mechanic has been working with me on it and we find out that there is a technical service bulletin regarding the problem, but no recall. I am the second owner so no lemon law to protect my investment. Around the same time, my 1999 Subaru gave up the ghost too. My dilemma is this: I need a car to commute to work (50 miles round trip) and I need a 4X4 truck to haul my horse trailer and for farm work. Resources are of course limited, should I buy an inexpensive ~$4000 car and trade the truck for 2006 or 07 F150/Silverado or should I trade truck for nicer car and buy an older truck? Do cars or trucks hold value better? What sort of trade will I get with this lemon? I’m sure the dealer knew what the problem was, it has only 82,000 miles on it.