Narrative:

While flying to ZZZ; the ful tower said to either climb or descend to avoid a medfly aircraft at my then altitude of 2;000 feet MSL. I would soon be passing over hills so I chose to climb to avoid the medfly aircraft. I leveled off for a few seconds at 2;400 MSL as I saw the medfly below and reported it to ful tower and descended.I noticed that I was under the south east corner of the lax class B. I decided to report this as I usually stay at 2;000 MSL in this area and I do not know what the computers said my altitude was. If there was any intrusion into class B it was inadvertent due to towers request I avoid the other aircraft and my eyes were out the window looking for the other aircraft. I had my foreflight display on my mini but was looking for the actual aircraft.

Google
 

Original NASA ASRS Text

Title: C170 pilot reported possible Class B violation while avoiding another aircraft.

Narrative: While flying to ZZZ; the FUL Tower said to either climb or descend to avoid a medfly aircraft at my then altitude of 2;000 feet MSL. I would soon be passing over hills so I chose to climb to avoid the medfly aircraft. I leveled off for a few seconds at 2;400 MSL as I saw the medfly below and reported it to FUL Tower and descended.I noticed that I was under the south east corner of the LAX class B. I decided to report this as I usually stay at 2;000 MSL in this area and I do not know what the computers said my altitude was. If there was any intrusion into class B it was inadvertent due to towers request I avoid the other aircraft and my eyes were out the window looking for the other aircraft. I had my ForeFlight display on my mini but was looking for the actual aircraft.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.